Skip to content

Instantly share code, notes, and snippets.

@mattward
Last active March 19, 2019 15:03
Show Gist options
  • Save mattward/eec2dfad0c758f255a97 to your computer and use it in GitHub Desktop.
Save mattward/eec2dfad0c758f255a97 to your computer and use it in GitHub Desktop.
Useful .bashrc bits and bobs
# My lovely PS1 prompt, e.g. "matt@ziggy:~$ "
# The prompt is green but my input is white. Works best on a black background.
# PS1 is a shell variable not an environment variable - do not export
PS1='\[\e[0;32m\]\u@\h:\W\$\[\e[m\] '
# Show your *public* ip address
alias myip='curl -s -S http://checkip.amazonaws.com'
# Copy your *public* ip address to the clipboard (Mac OS only)
alias myip-clip='echo -n $(myip) | pbcopy'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment