diff options
Diffstat (limited to '.config/zsh')
-rw-r--r-- | .config/zsh/.zshrc | 14 | ||||
-rw-r--r-- | .config/zsh/alias.zsh | 42 |
2 files changed, 35 insertions, 21 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)' diff --git a/.config/zsh/alias.zsh b/.config/zsh/alias.zsh index 5ccc521..b8e1cb7 100644 --- a/.config/zsh/alias.zsh +++ b/.config/zsh/alias.zsh @@ -1,21 +1,21 @@ -alias ls='/usr/local/bin/exa -l' -alias c='/usr/bin/clear' -alias less='/usr/bin/less --tabs 4' -alias bc='/usr/bin/clear; /usr/bin/bc -l' -alias emacs='/usr/local/bin/emacs -nw' -alias mkf='/usr/local/bin/gmake fclean' -alias mkc='/usr/local/bin/gmake clean' -alias mk='/usr/local/bin/gmake -j5' -alias web='/usr/local/bin/w3m https://duckduckgo.com/' -alias cp='/bin/cp -iv' -alias mv='/bin/mv -iv' -alias rm='/bin/rm -v' -alias ln='/bin/ln -v' -alias mkdir='/bin/mkdir -v' -alias rmdir='/bin/rmdir -v' -alias chmod='/bin/chmod -v' -alias chown='/usr/sbin/chown -v' -alias grep='/usr/bin/grep --color' -alias tree='/usr/local/bin/tree -C' -alias ccache='/usr/local/bin/ccache' -alias dotgit='/usr/local/bin/git --git-dir=$HOME/Documents/dotfiles-bsd --work-tree=$HOME' +alias ls='exa -l' +alias c='clear' +alias less='less --tabs 4' +alias bc='clear; bc -l' +alias emacs='emacs -nw' +alias mkf='gmake fclean' +alias mkc='gmake clean' +alias mk='gmake -j5' +alias web='w3m https://duckduckgo.com/' +alias cp='cp -iv' +alias mv='mv -iv' +alias rm='rm -v' +alias ln='ln -v' +alias mkdir='mkdir -v' +alias rmdir='rmdir -v' +alias chmod='chmod -v' +alias chown='chown -v' +alias grep='grep --color' +alias tree='tree -C' +alias ccache='ccache' +alias dotgit='git --git-dir=$HOME/Documents/dotfiles-bsd --work-tree=$HOME' |