From d18b0be518f527eb15365d91ce277f8066cdbe6b Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 16 Oct 2017 19:33:38 +0200 Subject: [PATCH] Revert "Fix cd completions if a directory exists in $CDPATH and $PWD" That's not what happens - I had set CDPATH to start with ".". See #4484. This reverts commit 1af38d69a81fcc7d6e1fd7f7ac7b6e42e96951ce. --- share/functions/__fish_complete_cd.fish | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/share/functions/__fish_complete_cd.fish b/share/functions/__fish_complete_cd.fish index f530120ca..190f9b935 100644 --- a/share/functions/__fish_complete_cd.fish +++ b/share/functions/__fish_complete_cd.fish @@ -30,14 +30,9 @@ function __fish_complete_cd -d "Completions for the cd command" set -l desc (string replace -r -- "^$HOME" "~" "$cdpath") # This assumes the CDPATH component itself is cd-able. for d in $cdpath/$token*/ - set -l withoutcdpath (string replace -- "$cdpath/" "" $d) - # Skip if the path exists in the current directory, since that's what `cd` will use. - if test -d "$withoutcdpath" -a -x "$withoutcdpath" - continue - end # Remove the cdpath component again. test -x $d - and printf "%s\tCDPATH %s\n" "$withoutcdpath" $desc + and printf "%s\tCDPATH %s\n" (string replace -r "^$cdpath/" "" -- $d) $desc end end end