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
|
# 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
|
|
||||||
#
|
#
|
||||||
# To choose an existing instance for nvr, use:
|
# https://unix.stackexchange.com/questions/250314/whats-the-intended-use-case-for-complete-aliases-in-zsh
|
||||||
# `export NVIM=$(nvr --serverlist | fzf --exit-0 --select-1) && echo $NVIM`
|
# See also the Completion section below
|
||||||
alias vi='nvim'
|
|
||||||
|
|
||||||
|
|
||||||
# Debian Specific:
|
|
||||||
# sudo dpkg-divert --divert /usr/bin/fd --rename /usr/bin/fdfind
|
|
||||||
|
|
||||||
alias cp='cp --interactive'
|
alias cp='cp --interactive'
|
||||||
|
alias ls='exa --icons --no-permissions --no-user'
|
||||||
alias mv='mv --interactive'
|
alias mv='mv --interactive'
|
||||||
alias rm='rm -I'
|
alias rm='rm -I'
|
||||||
|
|
||||||
autoload -U zmv
|
autoload -U zmv
|
||||||
alias mmv='noglob zmv -W'
|
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()
|
lg()
|
||||||
{
|
{
|
||||||
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
|
export LAZYGIT_NEW_DIR_FILE=~/.lazygit/newdir
|
||||||
@ -192,6 +191,21 @@ lg()
|
|||||||
fi
|
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
|
### Aliases -- Global & automatic expansion
|
||||||
@ -314,8 +328,5 @@ typeset -U path fpath
|
|||||||
### Completion Late Definitions
|
### Completion Late Definitions
|
||||||
###
|
###
|
||||||
|
|
||||||
compdef colormake=make
|
|
||||||
compdef colormake-short=make
|
|
||||||
|
|
||||||
# Hide "parameters" (i.e. environment variables) when looking for a "command"
|
# Hide "parameters" (i.e. environment variables) when looking for a "command"
|
||||||
zstyle ':completion:*:-command-:*' tag-order '!parameters'
|
zstyle ':completion:*:-command-:*' tag-order '!parameters'
|
||||||
|
Loading…
Reference in New Issue
Block a user