Fix alias completion, cleaner setup for grc and clean up some old zsh stuff
This commit is contained in:
parent
f001a93cf2
commit
5035123437
2 changed files with 7 additions and 73 deletions
|
@ -20,7 +20,7 @@ setopt INC_APPEND_HISTORY_TIME
|
||||||
setopt EXTENDED_HISTORY
|
setopt EXTENDED_HISTORY
|
||||||
|
|
||||||
# Enable completions for aliases
|
# Enable completions for aliases
|
||||||
setopt complete_aliases
|
setopt no_complete_aliases
|
||||||
|
|
||||||
# Variable to pass to sdotdrop to get current user
|
# Variable to pass to sdotdrop to get current user
|
||||||
export USRNAME=$USER
|
export USRNAME=$USER
|
||||||
|
@ -39,23 +39,16 @@ export SKIM_DEFAULT_OPTIONS="$SKIM_DEFAULT_OPTS" # TODO make an issue/PR about t
|
||||||
export SKIM_COMPLETION_TRIGGER='**'
|
export SKIM_COMPLETION_TRIGGER='**'
|
||||||
export SKIM_CTRL_T_COMMAND="$SKIM_DEFAULT_COMMAND"
|
export SKIM_CTRL_T_COMMAND="$SKIM_DEFAULT_COMMAND"
|
||||||
export SKIM_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
|
export SKIM_CTRL_T_OPTS='--preview "bat --color=always --style=numbers --line-range=:500 {}"'
|
||||||
# copy for fzf, incase I ever use it
|
|
||||||
export FZF_DEFAULT_COMMAND="$SKIM_DEFAULT_COMMAND"
|
|
||||||
export FZF_ALT_C_COMMAND="$SKIM_ALT_C_COMMAND"
|
|
||||||
export FZF_DEFAULT_OPTS="$SKIM_DEFAULT_OPTS"
|
|
||||||
export FZF_COMPLETION_TRIGGER="$SKIM_COMPLETION_TRIGGER"
|
|
||||||
export FZF_CTRL_T_COMMAND="$SKIM_DEFAULT_COMMAND"
|
|
||||||
export FZF_CTRL_T_OPTS="$SKIM_CTRL_T_OPTS"
|
|
||||||
|
|
||||||
# dotfile repository location
|
# dotfile repository location
|
||||||
export DOTREPO="$HOME/git/dotfiles"
|
export DOTREPO="$HOME/git/dotfiles"
|
||||||
|
|
||||||
# nvim ftw!
|
# nvim ftw!
|
||||||
export EDITOR=nvim
|
export EDITOR=nvim
|
||||||
export PAGER="nvim -R"
|
export PAGER="$EDITOR -R"
|
||||||
export PARU_PAGER="$PAGER -c 'set ft=PKGBUILD'"
|
export PARU_PAGER="$PAGER -c 'set ft=PKGBUILD'"
|
||||||
export AUR_PAGER=$PAGER
|
export AUR_PAGER=$PAGER
|
||||||
export MANPAGER="nvim +Man!"
|
export MANPAGER="$EDITOR +Man!"
|
||||||
|
|
||||||
# Use GPG for SSH authentication
|
# Use GPG for SSH authentication
|
||||||
export GPG_TTY="$(tty)"
|
export GPG_TTY="$(tty)"
|
||||||
|
@ -66,3 +59,6 @@ if [ "$SSH_CONNECTION" = "" ]; then
|
||||||
#gpgconf --launch gpg-agent
|
#gpgconf --launch gpg-agent
|
||||||
gpg-connect-agent updatestartuptty /bye >/dev/null
|
gpg-connect-agent updatestartuptty /bye >/dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Enable grc colorization of supported commands
|
||||||
|
[[ -s "/etc/grc.zsh" ]] && source /etc/grc.zsh
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
# git shorthands
|
# git shorthands
|
||||||
alias gc='git commit'
|
alias gc='git commit'
|
||||||
alias gac='ga && gc'
|
alias gac='ga && gc'
|
||||||
|
alias gs='git status'
|
||||||
alias gpull='git pull'
|
alias gpull='git pull'
|
||||||
alias gpush='git push'
|
alias gpush='git push'
|
||||||
|
|
||||||
alias mutt='neomutt'
|
|
||||||
|
|
||||||
# make skim zsh plugin use fd
|
# make skim zsh plugin use fd
|
||||||
_skim_compgen_dir() {
|
_skim_compgen_dir() {
|
||||||
fd -Ht d
|
fd -Ht d
|
||||||
|
@ -13,18 +12,10 @@ _skim_compgen_dir() {
|
||||||
_skim_compgen_path() {
|
_skim_compgen_path() {
|
||||||
fd -Ht f
|
fd -Ht f
|
||||||
}
|
}
|
||||||
# same for fzf
|
|
||||||
_fzf_compgen_dir() {
|
|
||||||
_skim_compgen_dir
|
|
||||||
}
|
|
||||||
_fzf_compgen_path() {
|
|
||||||
_skim_compgen_path
|
|
||||||
}
|
|
||||||
|
|
||||||
# Modern replacements for cat and ls
|
# Modern replacements for cat and ls
|
||||||
alias cat='bat --paging=never'
|
alias cat='bat --paging=never'
|
||||||
alias ls='exa'
|
alias ls='exa'
|
||||||
compdef ls='exa'
|
|
||||||
|
|
||||||
{%@@ if profile != "mko-laptop" @@%}
|
{%@@ if profile != "mko-laptop" @@%}
|
||||||
# Command not found handler
|
# Command not found handler
|
||||||
|
@ -152,7 +143,6 @@ compdef _dotdrop-completion.zsh sdotdrop
|
||||||
alias dotgit='git -C $DOTREPO'
|
alias dotgit='git -C $DOTREPO'
|
||||||
dotsync() { cd $DOTREPO && gpull && ga && gc && gpush && cd $OLDPWD }
|
dotsync() { cd $DOTREPO && gpull && ga && gc && gpush && cd $OLDPWD }
|
||||||
|
|
||||||
|
|
||||||
# sync password manager
|
# sync password manager
|
||||||
passync() { pass git pull && pass git push && updatesecrets }
|
passync() { pass git pull && pass git push && updatesecrets }
|
||||||
|
|
||||||
|
@ -235,62 +225,10 @@ alias notify-send='notify-send --icon=alarm'
|
||||||
# download archiso
|
# download archiso
|
||||||
alias archiso='curl "http://mirror.rackspace.com/archlinux/iso/$(date +%Y.%m).01/archlinux-$(date +%Y.%m).01-x86_64.iso"'
|
alias archiso='curl "http://mirror.rackspace.com/archlinux/iso/$(date +%Y.%m).01/archlinux-$(date +%Y.%m).01-x86_64.iso"'
|
||||||
|
|
||||||
# Update repository
|
|
||||||
|
|
||||||
|
|
||||||
# encrypted tar's with zstd compression
|
# encrypted tar's with zstd compression
|
||||||
cgpgtar() { tar cf - --zstd $1 | gpg -e -z 0 > $1.tar.zst.gpg }
|
cgpgtar() { tar cf - --zstd $1 | gpg -e -z 0 > $1.tar.zst.gpg }
|
||||||
xgpgtar() { gpg -d $1 | tar x --zstd }
|
xgpgtar() { gpg -d $1 | tar x --zstd }
|
||||||
|
|
||||||
# colorise output
|
|
||||||
alias cvs='grc cvs'
|
|
||||||
alias df='grc df'
|
|
||||||
alias digg='grc digg'
|
|
||||||
alias gcc='grc gcc'
|
|
||||||
alias g++='grc g++'
|
|
||||||
alias ifconfig='grc ifconfig'
|
|
||||||
alias make='grc make'
|
|
||||||
alias mount='grc mount'
|
|
||||||
alias mtr='grc mtr'
|
|
||||||
alias netstat='grc mount'
|
|
||||||
alias ping='grc ping'
|
|
||||||
alias ps='grc ps'
|
|
||||||
alias tail='grc tail'
|
|
||||||
alias traceroute='grc traceroute'
|
|
||||||
alias wdiff='grc wdiff'
|
|
||||||
alias blkid='grc blkid'
|
|
||||||
alias du='grc du'
|
|
||||||
alias dnf='grc dnf'
|
|
||||||
alias docker='grc docker'
|
|
||||||
alias docker-machine='grc docker-machine'
|
|
||||||
alias env='grc env'
|
|
||||||
alias id='grc id'
|
|
||||||
alias ip='grc ip'
|
|
||||||
alias iostat='grc iostat'
|
|
||||||
alias last='grc last'
|
|
||||||
alias lsattr='grc lsattr'
|
|
||||||
alias lsblk='grc lsblk'
|
|
||||||
alias lspci='grc lspci'
|
|
||||||
alias lsmod='grc lsmod'
|
|
||||||
alias lsof='grc lsof'
|
|
||||||
alias getfacl='grc getfacl'
|
|
||||||
alias getsebool='grc getsebool'
|
|
||||||
alias ulimit='grc ulimit'
|
|
||||||
alias uptime='grc uptime'
|
|
||||||
alias nmap='grc nmap'
|
|
||||||
alias fdisk='grc fdisk'
|
|
||||||
alias findmnt='grc findmnt'
|
|
||||||
alias free='grc free'
|
|
||||||
alias semanage='grc semanage'
|
|
||||||
alias sar='grc sar'
|
|
||||||
alias ss='grc ss'
|
|
||||||
alias sysctl='grc sysctl'
|
|
||||||
alias systemctl='grc systemctl'
|
|
||||||
alias stat='grc stat'
|
|
||||||
alias showmount='grc showmount'
|
|
||||||
alias tune2fs='grc tune2fs'
|
|
||||||
alias tcpdum='grc tcpdum'
|
|
||||||
|
|
||||||
btw, () {
|
btw, () {
|
||||||
echo " I use"
|
echo " I use"
|
||||||
echo "[38;2;23;147;209m ▄
|
echo "[38;2;23;147;209m ▄
|
||||||
|
|
Loading…
Reference in a new issue