From be70a6784268d52ee5292b01b47a666e263491b4 Mon Sep 17 00:00:00 2001 From: Daniel Carrillo Date: Fri, 10 Jul 2026 18:30:03 +0200 Subject: [PATCH] Update aliases for mac --- .zshrc | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/.zshrc b/.zshrc index 9dde6cf..b0bf585 100644 --- a/.zshrc +++ b/.zshrc @@ -51,7 +51,10 @@ alias issh='kitten ssh' alias k=kubectl alias kgy='kubectl get -o yaml' alias kready='kubectl get --raw="/readyz?verbose"' -alias ls='ls --group-directories-first --color=auto --hyperlink=auto' +case $(uname) in + Darwin) alias ls='$(brew --prefix)/bin/gls --group-directories-first --color=auto --hyperlink=auto' ;; + Linux) alias ls='ls --group-directories-first --color=auto --hyperlink=auto' ;; +esac alias neovim=nvim alias open='xdg-open' alias rgh="rg --hidden --glob '!.git/' --no-ignore-vcs" @@ -129,8 +132,12 @@ export PAGER='less' ##### fzf ##### -source /usr/share/fzf/key-bindings.zsh -source /usr/share/fzf/completion.zsh +case $(uname) in + Darwin) source "$(brew --prefix)/opt/fzf/shell/key-bindings.zsh" + source "$(brew --prefix)/opt/fzf/shell/completion.zsh" ;; + Linux) source /usr/share/fzf/key-bindings.zsh + source /usr/share/fzf/completion.zsh ;; +esac fzf-file-widget-hidden () { fd --type f --hidden --follow --exclude .git --exclude .cache | fzf @@ -157,7 +164,11 @@ eval "$(direnv hook zsh)" eval "$(atuin init zsh)" # aws cli zsh autocomplete -source /usr/bin/aws_zsh_completer.sh +case $(uname) in + Linux) source /usr/bin/aws_zsh_completer.sh ;; + Darwin) autoload bashcompinit && bashcompinit + complete -C "$(brew --prefix)/bin/aws_completer" aws ;; +esac # custom device