September 7, 2012
Neville Li & David Xia
- clear the screen Ctrl-L
- signal end of file (close terminal tab or exit ssh) Ctrl-D
- abort current command Ctrl-C
- jump to beginning of line Ctrl-A
- jump to end of line Ctrl-E
- clear the line Ctrl-U
- clear the line ahead of the cursor Ctrl-K
- delete backwards one word Ctrl-W
-
search backwards Ctrl-R
-
search forwards Ctrl-S
PS1="[\d \t \u@\h:\w ] $ "
displays date/time, hostname and current directory- add to ~/.bashrc to make permanent
- more special characters
- bash-completion (debian/ubuntu/homebrew)
- autojump (homebrew/debian/ubuntu)
$ j [a few characters in the path]
- zsh
- oh-my-zsh
- community-driven framework for managing zsh configuration
- plugins
- terminal themes
- easily customizable
- multiple connections
- repeated connections
- hostname aliases
- don't need to type usernames
- persistent connections
- jumphost
- more
Git:
~/.gitconfig init.templatedir for global template, located in .dotfiles/git
2 hooks: commit-msg for Gerrit and ctags index rebuild after repo changes.
git add -p # stage changes one by one
git diff --cached # show staged changes
git diff HEAD
n # diff against n'th previous changen # rebase from n'th previous changegit rebase -i HEAD
Checkout https://github.com/nevillelyh/dotfiles/tree/master/.dotfiles/scripts/
git-amend # amend stage changes to current HEAD, reuse commit message, useful for revising review
git-review # gerrit review
Bootstrapping, one script to rule them all:
https://github.com/nevillelyh/dotfiles/blob/master/.dotfiles/scripts/bootstrap-dotfiles.sh
To move in to a new machine (homebrew style):
bash -c "$(curl -fsSL https://raw.github.com/nevillelyh/dotfiles/master/.dotfiles/scripts/bootstrap-dotfiles.sh)"