Live data from Hacker News

Love Your Terminal

blog.andrewhays.net

61–70 of 137 posts

Re: Love Your Terminal

#61
YA post about making fancy prompts - at least its not about how to make a ssh tunnel ;-)

Personally I'm never using anything, or adding any fancy setting, if it doesn't serve any direct purpose and/or is not clear, simple and efficient.

It's not because I believe "simple" and "efficient" are "cool" or "better". It's just because it's always what made _me_ efficient. I don't lose much time digging configs either, and I scan man's pretty quickly every time I need something.

In the end that means my shell looks boring. White on black. Username, host, current directory, VCS info if any. Colored output for tools that support it in a sane fashion. Merged shell history. That's it.

Defaults are in general sane. That's why they're defaults after all. Oh and redoing my dotfile is ~ 2min from memory and work everywhere obviously. I don't need to care if I'm going to spin a VM, it'll work the way I expect it without having to copy stuff and tinker around.

I do the same for the gui so i generally just run KDE or MATE. Tinkering 3 days with awesomewm or using someone's "super cool" but useless configs.. nope, not my thing ;-)

Re: Love Your Terminal

#62
post #32

prezto [1] is a nice alternative to oh-my-zsh. I find it to be faster and it's more modular. [1] - https://github.com/sorin-ionescu/prezto

Is it working properly now? Last time I've tried it I had to go back to oh-my-zsh because prezto screwed my terminal. By the way, one of these days debugging the slow startup time of oh-my-zsh I found the culprit, virtualenvwrapper. Again I didn't have the time to good deep into that, so I just edited out that line from my .zshrc.

Seems to be using properly for me. I've been using it for a month now and I didn't have any issues with it. But that may be because I'm only using the basic plugins which are enabled by default, nothing fancy.

EDIT: I'm using urxvt btw

Re: Love Your Terminal

#63
post #2

use tmux for multiple screens and ditch that xorg garbage.

I don't understand why I'd want to use tmux locally. I'm a huge believer in tmux on remote machines though. Why would I want to use it on my local laptop?

I've only ever seen people advocate for tmux locally who can't (or don't want to) run something like xmonad as their window manager.

Re: Love Your Terminal

#64
post #63

Earlier quoted context omitted.

I don't understand why I'd want to use tmux locally. I'm a huge believer in tmux on remote machines though. Why would I want to use it on my local laptop?

I've only ever seen people advocate for tmux locally who can't (or don't want to) run something like xmonad as their window manager.

I'm a xmonad user and I use tmux. I agree that they both provide similar benefits, but the killer benefit for tmux is the persistence. I can have n sessions open and it's still easy to switch between them. Just disconnect the old one and attach to the new one. With xmonad you would either need to have many topic spaces (and recompile config when you want new one) or close the old ones

Re: Love Your Terminal

#65
post #56
post #27

If you're using git, I suggest fixing up your prompts so it doesn't display the sign for Mercury when in a git repo. So much junk in a prompt... I clicked on the link to Steve Losh's page and had a heck of a time figuring out what commands he had actually typed. The bash defaults are pretty reasonable: show your working directory, maybe your username, and a $ to end the prompt. If you're root, you get a # instead. It…

> So much junk in a prompt... I clicked on the link to Steve Losh's page and had a heck of a time figuring out what commands he had actually typed The point of configuring your prompt is it has to be easy for you to read. Whether someone else finds it readable or not is a non issue. Though not as verbose as Steve Losh's, I use a similar prompt which looks like this: rahul@mean-machine: ~/musings (git::master) ± $ The…

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!

Re: Love Your Terminal

#66
post #37
post #31

Earlier quoted context omitted.

Cygwin, with mintty and all the trimmings. Or Clink - https://code.google.com/p/clink/

Clink is just what I need for those times I ahve to use cmd.exe - thank you for the tip!

Thank my brother, he's the author! :)

Re: Love Your Terminal

#67
post #48
post #27

If you're using git, I suggest fixing up your prompts so it doesn't display the sign for Mercury when in a git repo. So much junk in a prompt... I clicked on the link to Steve Losh's page and had a heck of a time figuring out what commands he had actually typed. The bash defaults are pretty reasonable: show your working directory, maybe your username, and a $ to end the prompt. If you're root, you get a # instead. It…

A friend of mine has an extremely simple prompt. It just shows as $ or # (for root) and has a single field before that - the exit status of the previous command.

Still way too complex, simplicity means subscribing to the ed school of prompts: neither `$` nor `#`, just `?` when the previous command returned a non-zero status.

Re: Love Your Terminal

#68
post #65
post #56

Earlier quoted context omitted.

> So much junk in a prompt... I clicked on the link to Steve Losh's page and had a heck of a time figuring out what commands he had actually typed The point of configuring your prompt is it has to be easy for you to read. Whether someone else finds it readable or not is a non issue. Though not as verbose as Steve Losh's, I use a similar prompt which looks like this: rahul@mean-machine: ~/musings (git::master) ± $ The…

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)

Re: Love Your Terminal

#69

Yet another article proclaiming bash as garbage and zsh as the best thing since sliced bread.

My thoughts exactly. Everything mentioned there is just as doable in bash.

He referred readers to the Wikipedia comparison page, so I went there and duly compared bash to zsh in all the comparison tables.

A couple of minor differences, otherwise exactly the same...

Re: Love Your Terminal

#70
post #32

prezto [1] is a nice alternative to oh-my-zsh. I find it to be faster and it's more modular. [1] - https://github.com/sorin-ionescu/prezto

Is it working properly now? Last time I've tried it I had to go back to oh-my-zsh because prezto screwed my terminal. By the way, one of these days debugging the slow startup time of oh-my-zsh I found the culprit, virtualenvwrapper. Again I didn't have the time to good deep into that, so I just edited out that line from my .zshrc.

Be sure to read the documentation when installing zprezto on OSX. If you don't run the following, your PATH will be screwed up.

sudo chmod ugo-x /usr/libexec/path_helper

Post reply on HN