Add some more zsh nicetohaves

This commit is contained in:
elkowar 2021-10-08 17:14:46 +02:00
parent 263c805697
commit f21828ae0a
No known key found for this signature in database
GPG key ID: E321AD71B1D1F27F
2 changed files with 16 additions and 0 deletions

13
zsh/.config/zsh/.zlogin Normal file
View file

@ -0,0 +1,13 @@
# Function to determine the need of a zcompile. If the .zwc file
# does not exist, or the base file is newer, we need to compile.
# These jobs are asynchronous, and will not impact the interactive shell
zcompare() {
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
zcompile ${1}
fi
}
emulate zsh -o extended_glob -c "local files=($ZDOTDIR/*/*.zsh)"
for file in "${files[@]}"; do
zcompare $file
done

View file

@ -22,6 +22,8 @@ zplug "zsh-users/zsh-history-substring-search", defer:2
zplug "zdharma/fast-syntax-highlighting", defer:2
zplug "zsh-users/zsh-autosuggestions"
zplug "olets/zsh-abbr"
zplug "sudosubin/zsh-github-cli"
zplug "pkulev/zsh-rustup-completion"
if ! zplug check --verbose; then
printf "Install? [y/N]: "
@ -63,6 +65,7 @@ bindkey '^W' my-backward-delete-word
bindkey '^H' backward-delete-word
bindkey "^[[H" beginning-of-line
bindkey "^[[F" end-of-line
bindkey "^[." insert-last-word
bindkey '^[[A' history-substring-search-up
bindkey '^[[B' history-substring-search-down