fish-shell/tests/test6.out
ridiculousfish e395a0eb69 Migrate PATH-completion logic from complete.cpp to expand.cpp
Prior to this fix, when completing a command that doesn't have a /, we
would prepend each component of PATH and then expand the whole thing. So
any special characters in the PATH would be interpreted when performing
tab completion.

With this fix, we pull the PATH resolution out of complete.cpp and
migrate it to expand.cpp. This unifies nicely with the CDPATH resolution
already in that file. This requires introducing a new expand flag
EXPAND_SPECIAL_FOR_COMMAND, which is analogous to EXPAND_SPECIAL_CD
(which is renamed to EXPAND_SPECIAL_FOR_CD). This flag tells expand to
resolve paths against PATH instead of the working directory.

Fixes 
2016-04-07 20:15:32 -07:00

38 lines
375 B
Plaintext

AAAA:
--abcd
AAAA:
--abcd
--efgh
BBBB:
--abcd
BBBB:
CCCC:
--bar
--baz
-a
-b
-bar
-foo
CCCC:
--baz
-a
-b
-bar
-foo
CCCC:
--baz
-a
-b
-bar
CCCC:
--baz
-b
-bar
CCCC:
implicit cd complete works
no implicit cd complete after 'command'
PATH does not cause incorrect implicit cd
Command completion with parened PATHs test passed
Command completion with intermediate slashes passed