Last active
April 16, 2020 14:24
-
-
Save nickylimjj/fc08049fc9b115d5732240bc655a3952 to your computer and use it in GitHub Desktop.
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
# .bash_aliases | |
# Useful commands for the terminal | |
# Created by Nicky Lim | |
# some references from | |
## https://www.cyberciti.biz/tips/bash-aliases-mac-centos-linux-unix.html | |
############################ | |
# Useful in-built commands # | |
############################ | |
## alt + . get last argument | |
## `!!` last output | |
## ctrl + r reverse-search | |
## ctrl + a start of line | |
## ctrl + e end of line | |
## $[1+0xde] evaluate math | |
########### | |
# Aliases # | |
########### | |
# Copy/paste | |
alias "c=xclip" | |
alias "v=xclip -o" | |
alias "cs=xclip -selection clipboard" | |
# SHA1 digest generation | |
alias sha1='openssl sha1' | |
# Folder generation | |
alias mkdir='mkdir -pv' | |
# Colorful comparison (requires apt install colordiff) | |
alias diff='colordiff' | |
# sudo vim | |
alias svi='sudo vi' | |
# Confirmation of overwrite | |
alias mv='mv -i' | |
alias cp='cp -i' | |
alias ln='ln -i' | |
# Resume wget by default | |
alias wget='wget -c' | |
# save last stdout to $LAST | |
PROMPT_COMMAND='LAST="`cat /tmp/x`"; exec >/dev/tty; exec > >(tee /tmp/x)' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment