From 614588c2a0cd2884a54bbf801f7afea3d975e002 Mon Sep 17 00:00:00 2001 From: Ted Kulp Date: Sat, 19 Jul 2025 07:37:39 -0400 Subject: [PATCH] fixes --- .config/zsh/eza.zsh | 6 +++--- .zshrc | 34 ++++++++++++++++++++++++---------- 2 files changed, 27 insertions(+), 13 deletions(-) diff --git a/.config/zsh/eza.zsh b/.config/zsh/eza.zsh index 0e2e25b..a0c62b6 100644 --- a/.config/zsh/eza.zsh +++ b/.config/zsh/eza.zsh @@ -2,7 +2,7 @@ ls() { eza --icons -G "$@" } zstyle ':completion:ls:*' description 'eza (icons, color)' -lm() { ls --sort=modified "$@" } +ldm() { ls --sort=modified "$@" } zstyle ':completion:lm:*' description 'ls sorted by modified time' la() { ls -a "$@" } @@ -15,13 +15,13 @@ zstyle ':completion:lam:*' description 'ls all sorted by modified time' 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 "$@" } +lldm() { 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 "$@" } +lladm() { lla --sort=modified "$@" } zstyle ':completion:llam:*' description 'll all sorted by modified time' # laa, lx, lxa diff --git a/.zshrc b/.zshrc index 37c19bc..fab1e54 100644 --- a/.zshrc +++ b/.zshrc @@ -27,7 +27,7 @@ zinit ice as'program' id-as'carapace' from'gh-r' atload' \ source <(carapace _carapace);' zinit light carapace-sh/carapace-bin -zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' +# zstyle ':completion:*' format $'\e[2;37mCompleting %d\e[m' # 6. Plugins (turbo when possible) zinit ice wait lucid atload'_zsh_autosuggest_start' @@ -49,19 +49,19 @@ zinit ice wait lucid blockf zinit light atuinsh/atuin bindkey '^r' atuin-search -zinit wait lucid for MichaelAquilina/zsh-autoswitch-virtualenv +zinit wait lucid for matthiasha/zsh-uv-env zinit ice wait lucid blockf 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 +if [[ "${TERM_PROGRAM}" == "tmux" ]]; then + # 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 + zstyle ':fzf-tab:*' query-string '' +fi # # direnv — from GitHub releases zinit from"gh-r" as"program" mv"direnv* -> direnv" \ @@ -94,6 +94,20 @@ function timezsh() { } ### End of Zinit's installer chunk +# Shell-GPT integration ZSH v0.2 +_sgpt_zsh() { +if [[ -n "$BUFFER" ]]; then + _sgpt_prev_cmd=$BUFFER + BUFFER+="⌛" + zle -I && zle redisplay + BUFFER=$(sgpt --shell <<< "$_sgpt_prev_cmd" --no-interaction) + zle end-of-line +fi +} +zle -N _sgpt_zsh +bindkey ^p _sgpt_zsh +# Shell-GPT integration ZSH v0.2 + if [ -n "${ZSH_DEBUGRC+1}" ]; then zprof fi