Skip to content

Instantly share code, notes, and snippets.

@jon3laze
Last active February 5, 2019 07:48
Show Gist options
  • Select an option

  • Save jon3laze/e45f615b0734ece4fc446f5dee7858d4 to your computer and use it in GitHub Desktop.

Select an option

Save jon3laze/e45f615b0734ece4fc446f5dee7858d4 to your computer and use it in GitHub Desktop.
My bash aliases file
## 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
}
@jon3laze
Copy link
Author

jon3laze commented Feb 5, 2019

*Non native alias requirements

Git aliases

Access Homestead globally

Access ngrok globally

Access Trellis dev projects globally

Lorem ipsum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment