diff --git a/cookbook/external_completers.md b/cookbook/external_completers.md index b08386f63e5..eb6934d9c4e 100644 --- a/cookbook/external_completers.md +++ b/cookbook/external_completers.md @@ -20,11 +20,11 @@ This completer will use [the fish shell](https://fishshell.com/) to handle compl ```nu let fish_completer = {|spans| - fish --command $"complete '--do-complete=($spans | str join ' ')'" + fish --command $"complete '--do-complete=($spans | str replace "'" "\\'" | str join ' ')'" | from tsv --flexible --noheaders --no-infer | rename value description | update value { - if ($in | path exists) {$'"($in | str replace "\"" "\\\"" )"'} else {$in} + if ($in | path exists) {$'"($in | path expand --no-symlink | str replace --all "\"" "\\\"" )"'} else {$in} } } ```