dotfiles/.shell_aliases

76 lines
2.5 KiB
Plaintext
Raw Normal View History

#!/bin/bash
# Use `al` to view and edit aliases
2020-04-21 15:31:35 -04:00
alias al="vim ~/.shell_aliases && source ~/.shell_aliases && pushdot"
# Sudo commands will turn red
alias sudo='echo -e "\e[1;31m" && sudo'
# Edit current wisdom with `wim`
alias wim="vim ~/.wisdom"
2020-04-22 14:23:42 -04:00
alias clip="xclip -selection clipboard"
alias vim="vim"
alias cim="vim"
# Use `vimc` to edit ~/.vimrc
2020-04-21 15:31:35 -04:00
alias v="vim ~/.vimrc && pushdot"
alias vimc="vim ~/.vimrc && pushdot"
alias cimc="vim ~/.vimrc && pushdot"
alias vims="vim -S *.vims"
# Use `zz` to edit ~/.zshrc
2020-04-21 15:31:35 -04:00
alias zz='vim ~/.zshrc && source ~/.zshrc && pushdot'
alias termrc='vim ~/.config/xfce4/terminal/terminalrc'
# Use `bb` and `uu` to build and apply bpi kernel changes
alias bb="echo '\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n' && cd ~/Desktop/Griffin/bpi_build_scripts/ && sudo ./bbuild.sh 3 && cd -"
alias qbb="echo '\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n\\n' && cd ~/Desktop/Griffin/bpi_build_scripts/ && sudo ./bbuild.sh 3 && cd -"
alias uu="cd ~/Desktop/Griffin/bpi_build_scripts/ && sudo ./update_sd.sh /dev/sde && cd -"
# Use `grepr` for a recursive, case-insensitive, and filtered grep
# alias grepr="grep -RInsi --color=auto --exclude-dir=.git --exclude=tags"
# alias grepr='grep -RInsi --color=auto --exclude-dir=.git --exclude-dir=banana_pi_kernel --exclude-dir={bpi_build_scripts, storm_dox, sam_dox} --exclude=tags --exclude=\*.{ko, o}'
alias grepr='grep -RInsi --color=auto --exclude-dir=.git --exclude-dir=banana_pi_kernel --exclude-dir=bpi_build_scripts --exclude=tags --exclude="*.ko"'
alias apt="sudo apt"
alias apt-get="sudo apt-get"
alias eject="sudo eject"
alias dpkg="sudo dpkg"
alias dpi="sudo dpkg -i"
2020-04-23 11:44:34 -04:00
alias pacman="sudo pacman"
alias systemctl="sudo systemctl"
# Use `fin` to search for files by name
alias fin="find -iname "
alias python="python3"
2020-04-30 13:37:24 -04:00
alias py="python3"
# Use `grubdate` to update grub
alias grubdate="sudo update-grub"
# Use `n` and `nn` to edit and view notes
alias n="vim ~/.notes && clear && cat ~/.notes && wis"
alias nn="cat ~/.notes && wis"
# Use `open` after `grepr` to vim a file with grep text matching $1
alias open=_open
alias open2=_open2
# `pp` and `pwoeroff` -> `poweroff`
alias pp=poweroff
alias pwoeroff=poweroff
2020-05-01 14:55:39 -04:00
# Use `ll` to get a detailed list of files, sorted by size
2020-05-01 14:57:03 -04:00
alias ll='ls --color=auto -FlrSh -w 80'
alias ls='ls --color=auto -F -w 80'
2020-05-01 14:53:21 -04:00
# Using du automatically finds the total
alias du='du -sh'
alias tags='ctags -f newtags -R . && mv newtags tags'
alias newvpn='sudo openvpn --config ~/.ssh/sagev.ovpn'