aliases: formatting, better gs alias, and bug fix with alias lsd

This commit is contained in:
PowerUser64 2022-04-14 21:34:56 -07:00
parent 70d5d0a503
commit e79e0989e6

View file

@ -1,27 +1,28 @@
#!/bin/sh #!/bin/sh
## Short hand programs (ex: sc = shellcheck) >>> ## Short hand programs (ex: sc = shellcheck) >>>
# use nvim rather than vim if the command exists # use nvim rather than vim if the command exists
alias \ alias \
vim='nvim' \ vim='nvim' \
vimdiff='nvim -d' vimdiff='nvim -d' \
alias \ alias \
vv='$EDITOR' \ vv='$EDITOR' \
e='$EDITOR' \ e='$EDITOR' \
sedit='sudoedit' \ sedit='sudoedit' \
# 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' \
# rmdir is long # rmdir is long
alias \ alias \
rmd='rmdir' \ rmd='rmdir' \
rd='rmdir' \ rd='rmdir' \
alias \ alias \
mkd="mkdir -p" \ mkd="mkdir -p" \
g=git \ g=git \
sctl='sudo systemctl' \ sctl='sudo systemctl' \
# <<< # <<<
@ -33,14 +34,14 @@ alias bc='bc -ql' # Make bc usable for fast math
[ -z "$VIMRUNTIME" ] && [ -z "$VIMRUNTIME" ] &&
alias glow='glow -p' # force Glow to preview with `less` if not in vim alias glow='glow -p' # force Glow to preview with `less` if not in vim
# I hate it when I get ghost script instead of git status. this will be removed # I hate it when I get ghost script instead of git status
alias gs="echo 'you don'\''t really want ghost script, do you?'" alias gs='echo "you don'\''t $(tput sitm)really$(tput sgr0) want ghost script now, do you?"'
# tell make to use all cpu cores # tell make to use all cpu cores
alias make='make -j$(nproc)' alias make='make -j$(nproc)'
# Colors # Colors
alias \ alias \
ls='ls -hN --color=auto --group-directories-first' \ ls='ls -hN --color=auto --group-directories-first' \
grep='grep --color=auto' \ grep='grep --color=auto' \
egrep='egrep --color=auto' \ egrep='egrep --color=auto' \
@ -50,12 +51,12 @@ alias \
# super duper paru alias # super duper paru alias
# shellcheck disable=SC2139 # shellcheck disable=SC2139
alias \ alias \
parue="$(which paru) --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup --fm nvim" \ parue="$(which paru) --color=auto --sudoloop --newsonupgrade --pgpfetch --upgrademenu --bottomup --fm nvim" \
paru='parue --skipreview' paru='parue --skipreview' \
if command -v lsd > /dev/null; then if command -v lsd > /dev/null; then
$IS_TTY && alias ls=lsd ! $IS_TTY && alias ls=lsd
alias lsd='lsd --group-dirs=first' alias lsd='lsd --group-dirs=first'
fi fi
# <<< # <<<
@ -80,22 +81,25 @@ alias ydotool='(sudo ydotoold &) && sleep 0.05 && sudo ydotool'
alias zup='zinit self-update && zinit update --parallel' alias zup='zinit self-update && zinit update --parallel'
# Edit config files # Edit config files
alias \ alias \
nvc='(cd ~/.config/nvim/lua/blake && nvim ../../init.lua)' \ nvc='(cd ~/.config/nvim/lua/blake && nvim ../../init.lua)' \
zc='$EDITOR ~/.zshrc' \ zc='$EDITOR ~/.zshrc' \
sc='$EDITOR $SHELL_CONFIG_DIR/shrc' \ sc='$EDITOR $SHELL_CONFIG_DIR/shrc' \
fstab='sudoedit /etc/fstab' \ fstab='sudoedit /etc/fstab' \
hst='$EDITOR $HISTFILE' \ histe='$EDITOR $HISTFILE' \
# Get me to my code faster
[ -n "$C" ] && alias cdc='cd "$C" && source ../bin/utils.bashrc'
# Git cLONE # Git cLONE
alias glone="git clone" alias glone="git clone"
# Docker # Docker
alias \ alias \
logs='docker-compose logs --tail=200 -f' \ logs='docker-compose logs --tail=200 -f' \
dupd='docker-compose up -d' \ dupd='docker-compose up -d' \
ddwn='docker-compose down' \ ddwn='docker-compose down' \
dc='docker-compose' \ dc='docker-compose' \
occ='docker exec -u www-data nextcloud php occ' \ occ='docker exec -u www-data nextcloud php occ' \
# file copying with a progress bar # file copying with a progress bar
@ -122,10 +126,10 @@ SMART_PLUG_IP='192.168.1.250'
alias light='tplink_smartplug.py -t $SMART_PLUG_IP -c' alias light='tplink_smartplug.py -t $SMART_PLUG_IP -c'
# Common ls aliases # Common ls aliases
alias \ alias \
l='ls' \ l='ls' \
la='ls -ah' \ la='ls -ah' \
ll='ls -lh' \ ll='ls -lh' \
lla='ls -lah' \ lla='ls -lah' \
# <<< # <<<