diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-20 16:16:21 +0200 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2020-09-20 16:16:21 +0200 |
commit | 7af63359f96204d9ac26d7d59260173ee2f03554 (patch) | |
tree | f9ba607cf7623e4e5bdc1869237af51451f6fc61 /.config/zsh/.zshrc | |
parent | Dumb update (diff) | |
download | dotfiles-bsd-7af63359f96204d9ac26d7d59260173ee2f03554.tar.gz dotfiles-bsd-7af63359f96204d9ac26d7d59260173ee2f03554.tar.bz2 dotfiles-bsd-7af63359f96204d9ac26d7d59260173ee2f03554.tar.xz dotfiles-bsd-7af63359f96204d9ac26d7d59260173ee2f03554.tar.zst dotfiles-bsd-7af63359f96204d9ac26d7d59260173ee2f03554.zip |
ZSH expand aliases update
Diffstat (limited to '.config/zsh/.zshrc')
-rw-r--r-- | .config/zsh/.zshrc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/.config/zsh/.zshrc b/.config/zsh/.zshrc index d9812a8..e99b6c6 100644 --- a/.config/zsh/.zshrc +++ b/.config/zsh/.zshrc @@ -37,5 +37,19 @@ bindkey "^e" edit-command-line [ -f "$XDG_CONFIG_HOME/zsh/alias.zsh" ] && source $ZDOTDIR/alias.zsh [ -f "$XDG_CONFIG_HOME/zsh/plugins.zsh" ] && source $ZDOTDIR/plugins.zsh +globalias() { + if [[ $LBUFFER =~ '^[a-z0-9]+$' ]]; then + zle _expand_alias + zle expand-word + fi + zle self-insert +} + +zle -N globalias + +bindkey -v " " globalias +bindkey -v "^ " magic-space +bindkey -M isearch " " magic-space + PROMPT="%B%{$fg[red]%}%M %{$fg[blue]%}%c%{$fg[red]%}%%%{$reset_color%} " RPROMPT="${RPROMPT}"'%{$fg_bold[red]%}%(?..%?)%{$reset_color%} $(gitprompt)' |