Skip to content

Commit

Permalink
Prefer exact match for recent dirs
Browse files Browse the repository at this point in the history
  • Loading branch information
marlonrichert committed Nov 12, 2021
1 parent a364a84 commit 424ec91
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/.autocomplete.recent-dirs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ zmodload -F zsh/parameter p:commands p:dirstack p:functions
ancestor=$ancestor:h
done

local exact=$reply[(r)*/$PREFIX$SUFFIX]
[[ -n $exact ]] &&
reply=( $exact ${reply[@]:#$exact} )

(( $#reply[@] ))
}
fi
Expand Down

0 comments on commit 424ec91

Please sign in to comment.