Hacker News new | past | comments | ask | show | jobs | submit login

I don't have any file or folder name starting with a dash, while underscores are pretty common. Treating dashes and underscores as equivalents saves you one keystroke (i.e. you can type `cd -folder<tab>` instead of `cd _folder<tab>`).



Is this really the reason? One keystroke? That just borders on bloat...

Just put "set -o vi" if you want to remove keystrokes, which this doesn't include.


I've used `set -o vi` for a while but found that emacs-like keybindings are much, much better for inline editing.

And yes, even one keystroke saved matters.


Oh no, I totally understand - typing this on a happy hacker keyboard ;).

I'm just somewhat of a cynic, since my workflow tends to fall on its face when I'm on a server that uses special snowflake rc files. Furthering that cynicism.. these days I'm just using plain /bin/sh for any shell scripts just because of the amazing level of bloat that exists within bash.


You mean it saves you one edit in the case where you've mistyped the directory name? Otherwise it seems like no keystrokes are saved among the two you show.

EDIT: groan, ok, you win. Net -1 keystroke for most keyboards.


The shift press doesn't count as keystroke? :)


Most keyboards only emit an underscore while a shift button is depressed.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: