diff --git a/zsh/zshrc b/zsh/zshrc index b80b1cb..fa0f223 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -112,7 +112,10 @@ zstyle ':omz:plugins:eza' 'icons' yes zstyle ':omz:plugins:eza' 'color-scale' all zstyle ':omz:plugins:eza' 'color-scale-mode' fixed zstyle ':omz:plugins:eza' 'size-prefix' si -zstyle ':omz:plugins:eza' 'hyperlink' yes +# NOTE: 'hyperlink' is intentionally NOT set here. The oh-my-zsh eza plugin adds +# a bare "--hyperlink" flag which eza (clap) treats as taking the next token as +# its optional value, so `la /` fails with "invalid value '/'". We re-enable +# hyperlinks safely below via the glued `--hyperlink=always` form. zstyle ':completion:*' menu select zstyle ':completion:*' matcher-list 'm:{a-z}={A-Za-z}' @@ -121,6 +124,14 @@ zstyle ':completion:*' special-dirs true source $OHMYZSH/oh-my-zsh.sh +# Re-enable eza hyperlinks safely. The oh-my-zsh eza plugin's bare +# --hyperlink flag eats the following path argument (eza clap optional-value), +# so we append the glued --hyperlink=always form to each eza alias instead. +for _ea in la ldot lD lDD ll ls lsd lsdl lS lT; do + (( $+aliases[$_ea] )) && alias "$_ea"="${aliases[$_ea]} --hyperlink=always" +done +unset _ea + alias c='clear' alias q="exit" alias nbstat=$'netbird status --json | jq -r \'.peers.details[]? | [(.hostname // .fqdn), .netbirdIp, .status] | @tsv\' | column -t -s $\'\\t\''