summaryrefslogtreecommitdiffstats
path: root/.config/zsh/.zshrc
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-09-20 16:16:21 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-09-20 16:16:21 +0200
commit7af63359f96204d9ac26d7d59260173ee2f03554 (patch)
treef9ba607cf7623e4e5bdc1869237af51451f6fc61 /.config/zsh/.zshrc
parentDumb update (diff)
downloaddotfiles-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/.zshrc14
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)'