diff --git a/.config/zsh/eza.zsh b/.config/zsh/eza.zsh index a33f452..0e2e25b 100644 --- a/.config/zsh/eza.zsh +++ b/.config/zsh/eza.zsh @@ -1,13 +1,45 @@ -zpcompdef _eza ls ll llm la lam laa lx lxa lS llt llta +# ls variants +ls() { eza --icons -G "$@" } +zstyle ':completion:ls:*' description 'eza (icons, color)' -alias ls="eza --icons -G" -alias ll="eza -lbF --icons --git" -alias llm="ll --sort=modified" -alias la="eza -lbhHigUmuSa --icons --git --color-scale --time-style=long-iso" -alias lam="la --sort=modified" -alias laa="eza -lbhHigUmuSaa --icons --git --color-scale --time-style=long-iso" -alias lx="eza -lbhHigUmuSa@ --icons --git --color-scale --time-style=long-iso" -alias lxa="eza -lbhHigUmuSa@a --icons --git --color-scale --time-style=long-iso" -alias lS="eza -1" -alias llt="eza -1 --icons --tree --git" -alias llta="eza -1 --icons --tree --git --all" +lm() { ls --sort=modified "$@" } +zstyle ':completion:lm:*' description 'ls sorted by modified time' + +la() { ls -a "$@" } +zstyle ':completion:la:*' description 'ls all (hidden files)' + +lam() { la --sort=modified "$@" } +zstyle ':completion:lam:*' description 'ls all sorted by modified time' + +# ll variants +ll() { eza -lbhHigUmuS --icons --git --color-scale --time-style=long-iso "$@" } +zstyle ':completion:ll:*' description 'eza long listing (git, color-scale, long time)' + +llm() { ll --sort=modified "$@" } +zstyle ':completion:llm:*' description 'll sorted by modified time' + +lla() { ll --all "$@" } +zstyle ':completion:lla:*' description 'll all (hidden files)' + +llam() { lla --sort=modified "$@" } +zstyle ':completion:llam:*' description 'll all sorted by modified time' + +# laa, lx, lxa +llaa() { lla --all "$@" } +zstyle ':completion:laa:*' description 'eza long listing (extra mode aa)' + +llx() { ll -@ "$@" } +zstyle ':completion:lx:*' description 'eza long listing with extended attributes' + +llxa() { llx --all "$@" } +zstyle ':completion:lxa:*' description 'eza long listing with extended attributes (all)' + +# misc +lS() { eza -1 "$@" } +zstyle ':completion:lS:*' description 'eza single column' + +llt() { eza -1 --icons --tree --git "$@" } +zstyle ':completion:llt:*' description 'eza tree view' + +llta() { llt --all "$@" } +zstyle ':completion:llta:*' description 'eza tree view with all files' diff --git a/.zshrc b/.zshrc index d7f2ee2..57223dc 100644 --- a/.zshrc +++ b/.zshrc @@ -3,6 +3,10 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" fi +if [ -n "${ZSH_DEBUGRC+1}" ]; then + zmodload zsh/zprof +fi + # 2. Load Zinit source "${HOME}/.local/share/zinit/zinit.git/zinit.zsh" @@ -34,8 +38,10 @@ zinit ice lucid wait'0' as'program' id-as'mmv' from'gh-r' \ mv'mmv* -> mmv' pick'mmv/mmv' zinit light 'itchyny/mmv' +export ATUIN_NOBIND="true" zinit ice wait lucid blockf zinit light atuinsh/atuin +bindkey '^r' atuin-search zinit wait lucid for MichaelAquilina/zsh-autoswitch-virtualenv @@ -45,6 +51,11 @@ zinit light ajeetdsouza/zoxide # fzf-tab — defer after other interactive tools zinit ice wait lucid blockf zinit light Aloxaf/fzf-tab +zstyle ':fzf-tab:*' fzf-command ftb-tmux-popup +zstyle ':fzf-tab:*' popup-min-size 200 8 + +zinit ice wait lucid blockf +zinit light Freed-Wu/fzf-tab-source # # direnv — from GitHub releases zinit from"gh-r" as"program" mv"direnv* -> direnv" \ @@ -76,3 +87,7 @@ function timezsh() { for i in {1..5}; do /usr/bin/time -p zsh -i -c exit; done } ### End of Zinit's installer chunk + +if [ -n "${ZSH_DEBUGRC+1}" ]; then + zprof +fi