From 4525535f3bbd9efa4b4a0a84aa61706d1cb63924 Mon Sep 17 00:00:00 2001 From: adam <56338480+adastx@users.noreply.github.com> Date: Sun, 9 Oct 2022 16:02:38 +0200 Subject: updated aliases, added some alias tab completion --- .config/aliases | 44 ++++++++++++++++++++++++++++++++++++-------- 1 file changed, 36 insertions(+), 8 deletions(-) diff --git a/.config/aliases b/.config/aliases index 6348370..a9573ae 100644 --- a/.config/aliases +++ b/.config/aliases @@ -1,30 +1,58 @@ #!/bin/bash +alias reload="source $HOME/.bash_profile" + alias vim="nvim" alias sudo='doas' alias sudoedit='doasedit' alias q='exit' alias c='clear' -alias nf='pfetch' alias t='todo.sh' +alias nf='pfetch' alias ls='exa' -alias l='ls -la' -alias lt='ls -T' -alias lh="ls -1dI '.|..' .*" +alias lh="exa -1dI '.|..' .*" +alias lt='exa -T' +alias l='exa -la' alias gs='git status' -alias lg="git log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(cyan)- %an%C(reset)%C(bold yellow)%d%C(reset)' --all" +alias ga='git add' +alias gu='git add -u' +alias df='git diff' +alias lg='git log --oneline --decorate --all --graph' -alias config='/usr/bin/git --git-dir=/home/adam/.cfg/ --work-tree=/home/adam' +alias config="git --git-dir=$HOME/.cfg/ --work-tree=$HOME" alias cs='config status' -alias clg="config log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(bold yellow)%d%C(reset)' --all" +alias ca='config add' +alias cu='config add -u' +alias cdf='config diff' +alias clg='config log --oneline --decorate --all --graph' +alias cvim="GIT_DIR=$HOME/.cfg GIT_WORK_TREE=$HOME nvim" alias shrc="nvim $HOME/.bashrc" alias vars="nvim $HOME/.bash_profile" alias wmrc="nvim $XDG_CONFIG_HOME/i3/config" -alias vimrc="nvim --cmd ':cd $XDG_CONFIG_HOME/nvim/ | edit lua/plugins.lua'" +alias vimrc="GIT_DIR=$HOME/.cfg GIT_WORK_TREE=$HOME \ + nvim --cmd ':cd $XDG_CONFIG_HOME/nvim/ | edit lua/plugins.lua'" alias initrc="nvim $XDG_CONFIG_HOME/X11/xinitrc" alias barconf="nvim $XDG_CONFIG_HOME/polybar/config.ini" alias aliases="nvim $XDG_CONFIG_HOME/aliases" + +alias mixer="pulsemixer" + +_completion_loader git +_completion_loader exa +_completion_loader todo.sh +_completion_loader sudo + +complete -o bashdefault -o default -o nospace -F __git_wrap__git_main config +complete -o bashdefault -o default -F _fzf_path_completion vim +complete -o bashdefault -o filenames -F _exa ls +complete -F _todo t +complete -F _sudo doas + +function fzf () { + command fzf --color=$(cat /home/adam/.config/color) "$@"; +}; +export -f fzf -- cgit v1.2.3-70-g09d2