#!/bin/bash function fin { find -iname "*$@*" } # Mkdir should remind you to use git alias mkdir="echo 'Maybe use git init if this is a new project' && mkdir" # Use `al` to view and edit aliases alias al="vim ~/.shell_aliases && source ~/.shell_aliases && pushdot" # Sudo commands will turn red alias sudo='echo -e "\e[1;31m" && sudo' alias clip="xclip -selection clipboard" alias cim="vim" # Use `vimc` to edit ~/.vimrc alias vimc="vim ~/.vimrc && pushdot" alias cimc="vim ~/.vimrc && pushdot" # Resume session alias vims="vim -S *.vims" # Use `zz` to edit ~/.zshrc alias zz='vim ~/.zshrc && source ~/.zshrc && pushdot' alias termrc='vim ~/.config/xfce4/terminal/terminalrc' # 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=tags' alias apt="sudo apt" alias apt-get="sudo apt-get" alias eject="sudo eject" alias dpkg="sudo dpkg" alias dpi="sudo dpkg -i" alias pacman="sudo pacman" alias systemctl="sudo systemctl" alias python="python3" alias py="python3" # Use `grubdate` to update grub alias grubdate="sudo update-grub" # 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 # Use `ll` to get a detailed list of files, sorted by size alias ll='ls --color=auto -FlrSh -w 80' alias ls='ls --color=auto -F -w 80' # Using du automatically finds the total alias du='du -sh' alias tags='ctags -f newtags -R . && mv newtags tags'