From 1b382f4f85cd566b545d3f2e685953fe28c1b8dd Mon Sep 17 00:00:00 2001 From: druckdev <63563978+druckdev@users.noreply.github.com> Date: Sun, 25 Oct 2020 02:20:18 +0200 Subject: [PATCH] zsh:alias: Do not use aliases dictionary Just use the command name instead of trying to directly expand previously defined aliases for the command. Nested aliases still work like this and using the dictionary breaks some stuff like syntax-highlighting. Put xxd into quotes just to be consistent. --- .config/zsh/plugins/alias.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.config/zsh/plugins/alias.zsh b/.config/zsh/plugins/alias.zsh index d92f952..1e79522 100644 --- a/.config/zsh/plugins/alias.zsh +++ b/.config/zsh/plugins/alias.zsh @@ -39,11 +39,11 @@ }' # Save keystrokes and my memory - alias la='${aliases[ls]:-ls} -A' - alias l='${aliases[ls]:-ls} -lh --time-style=long-iso' - alias ll='${aliases[l]} -A' + alias la='ls -A' + alias l='ls -lh --time-style=long-iso' + alias ll='l -A' alias cd..='cd ..' - alias cl='() { cd "$@" && ${aliases[ls]:-[ls]}' + alias cl='() { cd "$@" && ls }' alias getclip="xclip -selection c -o" alias setclip="perl -pe 'chomp if eof' | xclip -selection c" alias pdf='launch evince' @@ -71,10 +71,10 @@ ' alias qrdecode='zbarimg' alias loadhist='fc -RI' - alias hex=xxd + alias hex='xxd' alias bin='xxd -b -c4 | cut -d" " -f2-5' ! command -v nvim &>/dev/null || alias vim=nvim - alias vi='${aliases[vim]:-vim}' + alias vi='vim' alias resetCursor='echo -ne "\e[5 q"' alias makeThisScratchpad='echo -ne "\033]0;scratchpad-terminal\007"' # grep filenames and date entries in exiftool