4 ms·
Ask HN: What's your .bashrc?
What are some good aliases to make annoying things less annoying for me?
- voodoochilo 9y agoi use a german keyboard and i like these: alias öö=ll alias ..='cd ..'
- ksherlock 9y agoas of bash 4, 'shopt -s autocd' will "execute" a directory by cd-ing to it.
- voodoochilo 9y agoand?
- bananicorn 9y agoI call fish from my bashrc (because I want it to be my standard shell, but It can cause problems with certain scripts) I've aliased push to git push, and done the same with git commit. Edit: Of course the aliases are in my .fishrc, but it's the same in the end :)
- 013 9y agoStart typing a command and use the arrow keys to find your history of that command: bind '"\e[A": history-search-backward' bind '"\e[B": history-search-forward'
- probinso 9y agoecho "sleep 1" >> ~/.bashrc
- amarraja 9y agoA mishmash of stuff I have copied from various public "dotfiles" repos. Quite a few gems in here: https://github.com/mathiasbynens/dotfiles https://github.com/mathiasbynens/dotfiles
- tesla23 9y agoPretty much anything that requires sudo I would have an alias like: alias apt="sudo apt" ...
- veddox 9y agoOne alias I use a lot when programming is this one: alias todo='grep -r "FIXME" * ; grep -r "TODO" * ; grep -r "XXX" *' Also, with git (the first line is in my .bashrc, the second in .gitconfig): alias ghist='git hist | head' hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
- stevekemp 9y agoYou could simplify your first alias with something like this: alias todo='egrep -r "(FIXME|TODO|XXX)" .'
- revmoo 9y agoI have a bunch of aliases mostly. Any time I find myself typing the same command over and over I'll add a single or two-letter alias. So for Git, 'q' shows me git status, 'a' does git add *, and 'p' does git push origin master. I also have aliases for things like 'tail -f /var/log/nginx/error.log', very handy.