You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This works for some directories, but if you do something like cd ~/foo<tab> where foo is the unique prefix of a directory in your homedir, it will add a space.
Presumably because it is not tilde-expanding the result when it's a string. test -d does not tilde expand strings. In fact, i can't find any function that does - path resolve will not do it, etc.
It looks like fish added a way to expand tokens in master, which will be nice someday when everyone is on fish 3.8.
See the end of fish-shell/fish-shell#5793
Otherwise, the only way to make this work seems to be
eval "echo" <string>
IE
replacing set -a result (string join -- "" "~" (string sub --start 2 -- $token | string escape))
with set -a result (eval 'echo' (string join -- "" "~" (string sub --start 2 -- $token | string escape)))
makes it all work
this seems super ugly but even the bug report above mentions it as the way to get everything expanded.
Happy to prepare a patch.
The text was updated successfully, but these errors were encountered:
There is code that purports to avoid adding trailing spaces to directory expansions, here:
fifc/functions/_fifc.fish
Line 69 in e953fcd
This works for some directories, but if you do something like
cd ~/foo<tab>
where foo is the unique prefix of a directory in your homedir, it will add a space.Presumably because it is not tilde-expanding the result when it's a string.
test -d
does not tilde expand strings. In fact, i can't find any function that does - path resolve will not do it, etc.It looks like fish added a way to expand tokens in master, which will be nice someday when everyone is on fish 3.8.
See the end of fish-shell/fish-shell#5793
Otherwise, the only way to make this work seems to be
eval "echo" <string>
IE
replacing
set -a result (string join -- "" "~" (string sub --start 2 -- $token | string escape))
with
set -a result (eval 'echo' (string join -- "" "~" (string sub --start 2 -- $token | string escape)))
makes it all work
this seems super ugly but even the bug report above mentions it as the way to get everything expanded.
Happy to prepare a patch.
The text was updated successfully, but these errors were encountered: