Merge branch 'master' of git.blakenorth.net/home/git/dotfiles

This commit is contained in:
PowerUser64 2021-09-15 00:49:00 -07:00
commit 3cdb46761b

17
.zshrc
View file

@ -47,6 +47,8 @@
# use nvim rather than vim if the command exists # use nvim rather than vim if the command exists
[ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d" [ -x "$(command -v nvim)" ] && alias vim="nvim" vimdiff="nvim -d"
alias vv="$EDITOR"
# I do this too much by accident smh my head # I do this too much by accident smh my head
alias :q='exit' \ alias :q='exit' \
q='exit' \ q='exit' \
@ -73,7 +75,7 @@
diff="diff --color=auto" \ diff="diff --color=auto" \
ccat="highlight --out-format=ansi" \ ccat="highlight --out-format=ansi" \
pacman="pacman --color=auto" \ pacman="pacman --color=auto" \
paru="paru --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup" \ paru="paru --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup --skipreview" \
# <<< # <<<
## Mini short-hand scripts (ex: la = ls -a) >>> ## Mini short-hand scripts (ex: la = ls -a) >>>
# dotfile management # dotfile management
@ -83,9 +85,10 @@
# Edit config files # Edit config files
alias \ alias \
nvi="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/init.lua)" \ nvci="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/init.lua)" \
nvs="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/lua/settings.lua)" \ nvcs="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/lua/settings.lua)" \
nvp="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/lua/plugins.lua)" \ nvcp="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/lua/plugins.lua)" \
nvcl="(cd ~/.config/nvim && $EDITOR ~/.config/nvim/lua/lsp.lua)" \
zshrc="$EDITOR ~/.zshrc" \ zshrc="$EDITOR ~/.zshrc" \
todo="$EDITOR ~/todo.md" \ todo="$EDITOR ~/todo.md" \
fstab="sudo $EDITOR /etc/fstab" \ fstab="sudo $EDITOR /etc/fstab" \
@ -307,8 +310,10 @@
# Git cLONE cD # Git cLONE cD
gloned() { gloned() {
git clone "$1" git clone "$1"
# shellcheck disable=SC2016 if ! cd "$(echo "$1" | sed 's/\.git//g' | rev | cut -d '/' -f 1 | rev)";then
cd "$(echo "$1" | rev | cut -d '/' -f 1 | rev)" || (echo 'Error: Could not `cd` into the repo' && exit) || exit echo 'Error: Could not `cd` into the repo'
return 1
fi
} }
calc() { calc() {