aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--share/functions/__fish_complete_cd.fish4
1 files changed, 2 insertions, 2 deletions
diff --git a/share/functions/__fish_complete_cd.fish b/share/functions/__fish_complete_cd.fish
index cdbd02a7..3ba2ad9d 100644
--- a/share/functions/__fish_complete_cd.fish
+++ b/share/functions/__fish_complete_cd.fish
@@ -1,7 +1,7 @@
function __fish_complete_cd -d "Completions for the cd command"
set -l token (commandline -ct)
- # Absolute path - no descriptions and no CDPATH
- if string match -q '/*' -- $token
+ # Absolute path or explicitly from the current directory - no descriptions and no CDPATH
+ if string match -qr '^\.?\.?/.*' -- $token
for d in $token*/
# Check if it's accessible - the glob only matches directories
[ -x $d ]; and printf "%s\n" $d