Add additional downloadable completions
parent
6304f8507d
commit
8f4e94bc3e
|
@ -0,0 +1,19 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -eu
|
||||||
|
|
||||||
|
wget \
|
||||||
|
--output-document zsh-completions.tar.gz \
|
||||||
|
https://github.com/zsh-users/zsh-completions/archive/refs/heads/master.tar.gz
|
||||||
|
tar -xzf zsh-completions.tar.gz \
|
||||||
|
--strip-components=2 \
|
||||||
|
zsh-completions-master/src
|
||||||
|
rm zsh-completions.tar.gz
|
||||||
|
|
||||||
|
wget \
|
||||||
|
--output-document _docker \
|
||||||
|
https://github.com/docker/cli/raw/master/contrib/completion/zsh/_docker
|
||||||
|
|
||||||
|
wget \
|
||||||
|
--output-document _docker-compose \
|
||||||
|
https://github.com/greymd/docker-zsh-completion/raw/master/repos/docker/compose/master/contrib/completion/zsh/_docker-compose
|
|
@ -44,6 +44,9 @@
|
||||||
!.config/wofi
|
!.config/wofi
|
||||||
!.config/yabai
|
!.config/yabai
|
||||||
!.config/yadm
|
!.config/yadm
|
||||||
|
!.config/zsh-completions
|
||||||
|
.config/zsh-completions/*
|
||||||
|
!.config/zsh-completions/download.sh
|
||||||
.deno/bin
|
.deno/bin
|
||||||
.docker/.buildNodeID
|
.docker/.buildNodeID
|
||||||
.docker/.token_seed*
|
.docker/.token_seed*
|
||||||
|
@ -119,6 +122,7 @@
|
||||||
!.xkb
|
!.xkb
|
||||||
.zcompdump
|
.zcompdump
|
||||||
.zoom
|
.zoom
|
||||||
|
.zshrc-theme
|
||||||
!.zshrc
|
!.zshrc
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,9 @@
|
||||||
!.config/wofi
|
!.config/wofi
|
||||||
!.config/yabai
|
!.config/yabai
|
||||||
!.config/yadm
|
!.config/yadm
|
||||||
|
!.config/zsh-completions
|
||||||
|
.config/zsh-completions/*
|
||||||
|
!.config/zsh-completions/download.sh
|
||||||
.deno/bin
|
.deno/bin
|
||||||
.docker/.buildNodeID
|
.docker/.buildNodeID
|
||||||
.docker/.token_seed*
|
.docker/.token_seed*
|
||||||
|
@ -119,4 +122,5 @@
|
||||||
!.xkb
|
!.xkb
|
||||||
.zcompdump
|
.zcompdump
|
||||||
.zoom
|
.zoom
|
||||||
|
.zshrc-theme
|
||||||
!.zshrc
|
!.zshrc
|
||||||
|
|
22
.zshrc
22
.zshrc
|
@ -46,10 +46,10 @@ sup() {
|
||||||
prompt_run_count=0
|
prompt_run_count=0
|
||||||
on_second_prompt() {
|
on_second_prompt() {
|
||||||
if [[ "$prompt_run_count" == 1 ]] && [[ "$USER" != "root" ]]; then
|
if [[ "$prompt_run_count" == 1 ]] && [[ "$USER" != "root" ]]; then
|
||||||
#zmodload zsh/zprof
|
zmodload zsh/zprof
|
||||||
load_slower
|
load_slower
|
||||||
load_slowest
|
load_slowest
|
||||||
#zprof
|
zprof
|
||||||
fi
|
fi
|
||||||
(( prompt_run_count = prompt_run_count + 1 ))
|
(( prompt_run_count = prompt_run_count + 1 ))
|
||||||
}
|
}
|
||||||
|
@ -187,7 +187,6 @@ if [[ "$TERM" == "xterm-kitty" ]] && which kitty 2>&1 >/dev/null; then
|
||||||
alias ssh="kitty +kitten ssh"
|
alias ssh="kitty +kitten ssh"
|
||||||
fi
|
fi
|
||||||
setup_term_integration
|
setup_term_integration
|
||||||
#slower_functions+=( setup_term_integration )
|
|
||||||
|
|
||||||
# term fixes
|
# term fixes
|
||||||
|
|
||||||
|
@ -209,6 +208,9 @@ setup_completion() {
|
||||||
autoload -Uz bashcompinit
|
autoload -Uz bashcompinit
|
||||||
bashcompinit
|
bashcompinit
|
||||||
fi
|
fi
|
||||||
|
# Add default completions
|
||||||
|
fpath+="$HOME/.config/zsh-completions"
|
||||||
|
# Style completions
|
||||||
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
zstyle ':completion:*:default' list-colors ${(s.:.)LS_COLORS}
|
||||||
zstyle ':completion:*' auto-description 'specify: %d'
|
zstyle ':completion:*' auto-description 'specify: %d'
|
||||||
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
zstyle ':completion:*' completer _expand _complete _correct _approximate
|
||||||
|
@ -224,18 +226,19 @@ setup_completion() {
|
||||||
zstyle ':completion:*' verbose true
|
zstyle ':completion:*' verbose true
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
zstyle ':completion:*:kill:*' command 'ps -u $USER -o pid,%cpu,tty,cputime,cmd'
|
||||||
}
|
# Setup fast apps
|
||||||
slower_functions+=( setup_completion )
|
|
||||||
setup_completion_more() {
|
|
||||||
# Depends:
|
|
||||||
setup_completion
|
|
||||||
|
|
||||||
if which mc 2>&1 >/dev/null; then
|
if which mc 2>&1 >/dev/null; then
|
||||||
complete -o nospace -C mc mc
|
complete -o nospace -C mc mc
|
||||||
fi
|
fi
|
||||||
if which earthly 2>&1 >/dev/null; then
|
if which earthly 2>&1 >/dev/null; then
|
||||||
complete -o nospace -C earthly earthly
|
complete -o nospace -C earthly earthly
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
slower_functions+=( setup_completion )
|
||||||
|
setup_completion_more() {
|
||||||
|
# Depends:
|
||||||
|
setup_completion
|
||||||
|
|
||||||
if which kubectl 2>&1 >/dev/null; then
|
if which kubectl 2>&1 >/dev/null; then
|
||||||
source <(kubectl completion zsh)
|
source <(kubectl completion zsh)
|
||||||
fi
|
fi
|
||||||
|
@ -243,7 +246,6 @@ setup_completion_more() {
|
||||||
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
#slower_functions+=( setup_completion_more )
|
|
||||||
slowest_functions+=( setup_completion_more )
|
slowest_functions+=( setup_completion_more )
|
||||||
|
|
||||||
# color pagination
|
# color pagination
|
||||||
|
|
Loading…
Reference in New Issue