Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

A whole extra line above the working prompt? That just seems unnecessary.

If you need that info at any particular moment, make a command. I used to have one called wi (short for Where am I?) that threw out similar info. But displayed constantly? Yuck!



> A whole extra line above the working prompt?

Because it's frequently useful, and thus the tradeoff of a bit of space for simplicity, speed and familiarity is worth it.

> If you need that info at any particular moment, make a command.

Right, so your prompt is composed of nothing but the hardcoded character `>`? (you obviously don't need the $/# toggle as you can use `whoami`, and you don't need the previous command's status as that's what `$?` is for)


Setting your prompt to ";" can be useful, because then if you want to select a command with the mouse and paste it into another window, it's still valid even if you select the whole line--you don't have to worry about stopping at the prompt character, just triple-click the line (in X).


> Right, so your prompt is composed of nothing but the hardcoded character `>`

Hey that's what mine is! Actually it is simply the ')' character. I went from full on prompt-porn to nothing. For the most part this was just to see how much of the prompt I really needed on a daily basis (how often do I really type git branch because I don't know what branch I'm on, how often do I type pwd... stuff like that). Turns out I rarely use those commands, but to each their own.


It's an interesting approach! I want to try it in combination with some custom 1-or 2-letter command that would display all this 'prompt-porn' in a single line on demand.

Maybe a 1 or 2-letter indicator on what host I am (e.g. nothing for local, P for production, C for cluster head...), got confused too often.

And, of course, fuzzy completions of zsh.


My prompt is usually the system default, because I work across multiple systems, some of which don't even have bash (let alone zsh), and changing it seems unnecessary. 'wi' is just there to remind me where I am once in a while.

My general philosophy is to deal with whatever is the default and not become reliant on customisations because other systems I'll be required to use won't have any of them set up.


> My prompt is usually the system default, because I work across multiple systems,

Unless you get new systems everyday, multiple systems just mean copying ssh keys followed by scp of dotfiles.

> some of which don't even have bash (let alone zsh),

If it has bash, .bashrc gets executed. If it has neither, I use the system default. Just because sometimes there won't be a shell I use or configure(1%) doesn't mean I am going to put up with whatever the system throws at me(99%).

> 'wi' is just there to remind me where I am once in a while.

Any my "once in a while" is frequent. Multiple machines, multiple projects, multiple branches.

> My general philosophy is to deal with whatever is the default and not become reliant on customisations because other systems I'll be required to use won't have any of them set up.

If I have customized my vim to hell, it generally means I am familiar enough with vim to understand how vim works. Same goes for bash, screen, zsh, what have you. It isn't like when once in an eternity, I am forced to use a machine where I have to type "git branch" instead of "gitb", I am going to forget it.


Everything is unnecessary. Some things are nice. Some of the nicest things are those which reduce cognitive load. Anything that makes it easier for my brain to "lex" the wall of text in front of my face is very nice indeed.

The fact that my prompt shows additional information is a secondary thing. (It's sometimes nice to scroll back through output and be able to see what directory I was in.) The _important_ thing is that the color and extra space make it exceedingly easy to visually chunk commands and output.


How did wi differ from the built-in pwd? I've never found myself wishing for more than that.


Not by much, it was only four things - pwd, hostname, username and (when I was working in clearcase a lot) clearcase view name.

Just something I could run if I switched back to a shell and kinda forgot what or where it was.




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

Search: