Allan & Steve are the chubby founders of LessEverything. This is their blog, hear them rant, praise, give advice and talk about Just Stuff, Less Accounting, Lovd by Less, More Honey, Less Memories, Code, Business, Design, Marketing
February 12th, 2008

Cheat Sheets just got a lot better

written by Steven Bristol

For those of you who do not use Cheat Sheets, you should.

For those of you that do, they just got better. There is now an auto complete for bash. You can find it here

Text:
sheets=`cheat sheets | grep '^  '`
function complete_cheat {
  COMPREPLY=()
  if [ $COMP_CWORD = 1 ]; then
    COMPREPLY=(`compgen -W "$sheets" -- $2`)
  fi
}
complete -F complete_cheat cheat

Here are the instructions:

  1. Open terminal.
  2. cd ~
  3. Copy this text into your .bash_profile file.
  4. Either restart your terminal or run source .bash_profile
  5. Type cheat str(TAB)
  6. Cool huh?

Leave a Reply