feat(zsh): aliases & completion
This commit is contained in:
parent
1775912d38
commit
0aa0b98f17
49
.zshrc
49
.zshrc
@ -155,33 +155,32 @@ source ${ZIM_HOME}/init.zsh
|
||||
|
||||
|
||||
###
|
||||
### Aliases
|
||||
### Aliases / Functions
|
||||
###
|
||||
#
|
||||
# See https://www.thorsten-hans.com/5-types-of-zsh-aliases
|
||||
|
||||
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
||||
alias hg="kitty +kitten hyperlinked_grep"
|
||||
alias ls='exa --icons --no-permissions --no-user'
|
||||
alias make='colormake-short'
|
||||
|
||||
# Neovim — nvim
|
||||
# https://www.thorsten-hans.com/5-types-of-zsh-aliases
|
||||
#
|
||||
# To choose an existing instance for nvr, use:
|
||||
# `export NVIM=$(nvr --serverlist | fzf --exit-0 --select-1) && echo $NVIM`
|
||||
alias vi='nvim'
|
||||
|
||||
|
||||
# Debian Specific:
|
||||
# sudo dpkg-divert --divert /usr/bin/fd --rename /usr/bin/fdfind
|
||||
# https://unix.stackexchange.com/questions/250314/whats-the-intended-use-case-for-complete-aliases-in-zsh
|
||||
# See also the Completion section below
|
||||
|
||||
alias cp='cp --interactive'
|
||||
alias ls='exa --icons --no-permissions --no-user'
|
||||
alias mv='mv --interactive'
|
||||
alias rm='rm -I'
|
||||
|
||||
autoload -U zmv
|
||||
alias mmv='noglob zmv -W'
|
||||
|
||||
# Dev
|
||||
#
|
||||
alias make='colormake-short'
|
||||
compdef colormake=make
|
||||
compdef colormake-short=make
|
||||
|
||||
# Git
|
||||
#
|
||||
alias dotfiles='/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME'
|
||||
|
||||
lg()
|
||||
{
|
||||
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
|
||||
@ -192,6 +191,21 @@ lg()
|
||||
fi
|
||||
}
|
||||
|
||||
# Kitty
|
||||
#
|
||||
hg () { kitty +kitten hyperlinked_grep "$@" }
|
||||
compdef hg=rg
|
||||
|
||||
# Neovim — nvim
|
||||
#
|
||||
# To choose an existing instance for nvr, use:
|
||||
# `export NVIM=$(nvr --serverlist | fzf --exit-0 --select-1) && echo $NVIM`
|
||||
alias vi='nvim'
|
||||
|
||||
|
||||
# Debian Specific:
|
||||
# sudo dpkg-divert --divert /usr/bin/fd --rename /usr/bin/fdfind
|
||||
|
||||
|
||||
###
|
||||
### Aliases -- Global & automatic expansion
|
||||
@ -314,8 +328,5 @@ typeset -U path fpath
|
||||
### Completion Late Definitions
|
||||
###
|
||||
|
||||
compdef colormake=make
|
||||
compdef colormake-short=make
|
||||
|
||||
# Hide "parameters" (i.e. environment variables) when looking for a "command"
|
||||
zstyle ':completion:*:-command-:*' tag-order '!parameters'
|
||||
|
Loading…
Reference in New Issue
Block a user