Settings

Theme

Ask HN:What does your bash_profile look like?

6 points by chromedude 13 years ago · 4 comments · 1 min read

Reader

I just accidentally deleted my bash_profile file which contained most of the custom colors, shortcuts etc. I would love to see what other people's bash_profile looks like so maybe I could try a new color scheme and some new shortcuts.

stevekemp 13 years ago

My actual~/.bash_profile file is very minimal, it just sources each file in ~/.bash/ in turn.

You can see the organized contents of that directory here:

https://github.com/skx/dotfiles/tree/master/.bash/

  • jeff303 13 years ago

    Thanks, your "x" function looks useful. May I ask about the organization? Why the NN- prefix for filenames? Some type of standard I'm not aware of?

    • pledg 13 years ago

      When the contents of .bash are sourced it will be done in filename order. Some files might rely on others being sourced first. So using the numeric prefix allows controlling the order while still having meaningful names.

    • stevekemp 13 years ago

      I tend to do that when I'm using run-parts, or similar processing over a directory of files that will all be read. It ensures that files are always loaded in a predictable order.

      Usually it doesn't matter, but if you have dependencies it allows you to express them in a simple fashion. (e.g. defining a function in one file, and using it in another.)

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection