Last active
February 5, 2019 07:48
-
-
Save jon3laze/e45f615b0734ece4fc446f5dee7858d4 to your computer and use it in GitHub Desktop.
My bash aliases file
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## System cleanup ## | |
| alias clean='sudo apt-get autoclean --yes && sudo apt-get clean --yes && sudo apt-get autoremove --yes' | |
| ## Update ## | |
| alias update='sudo apt update --yes' | |
| ## Upgrade ## | |
| alias upgrade='sudo apt upgrade --yes' | |
| ## Make directory and parents ## | |
| alias mkdir='mkdir -pv' | |
| ## Change directory simplification ## | |
| alias cd..='cd ..' | |
| alias ..='cd ..' | |
| alias ...='cd ../../../' | |
| alias ....='cd ../../../../' | |
| alias .....='cd ../../../../' | |
| alias .4='cd ../../../../' | |
| alias .5='cd ../../../../..' | |
| ## List hidden files ## | |
| alias l.='ls -d .*' | |
| ## Show file count ## | |
| alias count='ls | wc -l' | |
| ## List in files long format ## | |
| alias ll='ls -la' | |
| ## Search command history | |
| alias gethist='history | grep ' | |
| ## Git aliases | |
| alias ga='git add' | |
| alias gaa='git add .' | |
| alias gc='git commit -m' | |
| alias gs='git status' | |
| alias gl="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit" | |
| ## Make directory and move into it ## | |
| mcd () { | |
| mkdir $1 | |
| cd $1 | |
| } | |
| ## Access Homestead globally | |
| function homestead() { | |
| ( cd ~/Homestead && vagrant $* ) | |
| } | |
| ## Access ngrok globally | |
| function ngrok() { | |
| ( ~/./ngrok $* ) | |
| } | |
| ## Access dev projects globally | |
| function trellis() { | |
| cd ~/code/trellis/$1/trellis/ | |
| vagrant $2 | |
| } | |
| ## Lorem ipsum | |
| ## Paragraphs | |
| function plorem() { | |
| lorem -p $1 | clipboard | |
| } | |
| ## Sentences | |
| function slorem() { | |
| lorem -s $1 | clipboard | |
| } | |
| ## Words | |
| function wlorem() { | |
| lorem -w $1 | clipboard | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
*Non native alias requirements
Git aliases
Access Homestead globally
Access ngrok globally
Access Trellis dev projects globally
Lorem ipsum