Skip to content

Instantly share code, notes, and snippets.

@lindacmsheard
Last active December 3, 2020 20:14
Show Gist options
  • Save lindacmsheard/d72e1d6a64d0e8033eec95037f213dc4 to your computer and use it in GitHub Desktop.
Save lindacmsheard/d72e1d6a64d0e8033eec95037f213dc4 to your computer and use it in GitHub Desktop.
cool aliases for bash

Note: these are tested on WSLv2 - add them to ~/.bash_aliases or other bash profile file.

Open sites in browser

alias newgist='wslview https://gist.github.com'
alias newgit='wslview https://github.com'
alias ap='wslview https://portal.azure.com'

# go to current repo web page - requires cli.github.com (ref [1])
alias gg='gh repo view --web'

Basics

alias lla='ls -la'

Git

alias gs='git status'
# change into git root
alias groot='cd `git rev-parse --show-toplevel`'

Terraform

alias tfp='terraform plan'
alias tfa='terraform apply'

Utils

# emulate mac clipboard 
alias pbcopy='xclip -selection clipboard'
alias pbpaste='xclip -selection clipboard -o'

References

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