
Ask HN: What's your .bashrc? - nol13
What are some good aliases to make annoying things less annoying for me?
======
veddox
One 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
You could simplify your first alias with something like this:

    
    
         alias todo='egrep -r "(FIXME|TODO|XXX)" .'

------
bananicorn
I 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
Start 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'

------
tesla23
Pretty much anything that requires sudo I would have an alias like:

    
    
       alias apt="sudo apt"
       ...

------
amarraja
A 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)

------
probinso
echo "sleep 1" >> ~/.bashrc

------
voodoochilo
i use a german keyboard and i like these:

alias öö=ll

alias ..='cd ..'

~~~
ksherlock
as of bash 4, 'shopt -s autocd' will "execute" a directory by cd-ing to it.

