main: Add highlighting for hashed directories with autocd and cdablevars#931
Open
zaidhaan wants to merge 1 commit intozsh-users:masterfrom
Open
main: Add highlighting for hashed directories with autocd and cdablevars#931zaidhaan wants to merge 1 commit intozsh-users:masterfrom
zaidhaan wants to merge 1 commit intozsh-users:masterfrom
Conversation
Member
|
I think we can take the CDABLE_VARS documentation fairly literally and just call elif (( autocd && cdablevars )) && [[ ${1[1]} != / ]]; then
_zsh_highlight_main_highlighter_expand_path "~$1"
if [[ -d $REPLY && -x $REPLY ]]; then
REPLY=autodirectory
return 0
fiThat covers the case where the path continues and the case where a username is provided. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See #930 (or at least just #930 (comment)).
What this PR does:
fooexists and the path it resolves to also exists, it will highlight it as ahashed-commandWhat this PR does not do:
If this feels like enough to be a PR on its own, then you could merge. If it feels incomplete, but on the right path, someone else could offer guidance and I'll see if I can complete it or they could pick it up themselves, or if it's completely wrong then it could just be closed.