Live data from Hacker News

Badassify your terminal and shell

jilles.me

31–40 of 54 posts

Re: Badassify your terminal and shell

#31
post #2

And what happens when you have to use the terminal on a machine that hasn't been "badassified"?

Exactly ... Back to basics. Just learn how to use the terminal in its default form. We've been doing it for years efficiently.

Dude. Optimize for your 99% use case. I spend ten minutes a week on someone else's machine. Does that really make it a bad idea to remove warts and add niceties to my machine? Assuming you aren't literally a stump it should be easy enough to go back to the defaults.

Re: Badassify your terminal and shell

#33
post #18

I don't want my terminal badassified; I want to get work done. Rather than bling out my command prompt I simply try to do what real developer, data, and sysadmin badasses do: * Learn your shell language -- really learn it. Learn how to fit programs together, how to manage jobs, and all of the control structures in your shell language. Avail yourself of aliases and shell functions. * Learn the Unix command set, sed, a…

Agreed.

I would add 'grep' in there as an absolute must have.

The sed, grep, awk holy trinity will allow you to do pretty much any type of text manipulation and searching that you can imagine.

Re: Badassify your terminal and shell

#34
post #18

I don't want my terminal badassified; I want to get work done. Rather than bling out my command prompt I simply try to do what real developer, data, and sysadmin badasses do: * Learn your shell language -- really learn it. Learn how to fit programs together, how to manage jobs, and all of the control structures in your shell language. Avail yourself of aliases and shell functions. * Learn the Unix command set, sed, a…

all of your bullet points are excellent advice, but:

having timestamps in my prompts has helped me straighten out what I did to get myself into a situation across a few different windows of a tmux session.

having all nonzero return codes show up automatically because of tweaking my oh-my-zsh configuration has definitely saved me time here and there.

root on my machines looks completely different visually compared to my regular user account(s) and this has stopped me from doing dumb things as root, again, while bouncing around in a tmux session.

Re: Badassify your terminal and shell

#35
post #18

I don't want my terminal badassified; I want to get work done. Rather than bling out my command prompt I simply try to do what real developer, data, and sysadmin badasses do: * Learn your shell language -- really learn it. Learn how to fit programs together, how to manage jobs, and all of the control structures in your shell language. Avail yourself of aliases and shell functions. * Learn the Unix command set, sed, a…

Right, sure - but you definitely - well, probably ;) - still want iTerm2!

For Linux, try terminator: http://gnometerminator.blogspot.co.uk/p/introduction.html , or your package manager. There are doubtless tons of other options.

Re: Badassify your terminal and shell

#36
post #18

I don't want my terminal badassified; I want to get work done. Rather than bling out my command prompt I simply try to do what real developer, data, and sysadmin badasses do: * Learn your shell language -- really learn it. Learn how to fit programs together, how to manage jobs, and all of the control structures in your shell language. Avail yourself of aliases and shell functions. * Learn the Unix command set, sed, a…

Using the world's most common shell in a standard configuration comes with benefits, too. Incredible portability of your code & experience.

Plus shells that try to be too smart or do too much always break, leaving you debugging your shell. Shoot me now.

Re: Badassify your terminal and shell

#37

Warning for newer developers: I confused myself much more than was necessary when I was first starting out, because I started using all of these tools like zshell/oh-my-zsh before I understood what was really going on, specifically with my $PATH. I seriously spent about a month floundering and becoming increasingly frustrated and confused before I finally sat down, read the docs, and learned why I should have been pu…

With Powerful Software comes ever-tempting Yak Shaving.

Re: Badassify your terminal and shell

#38
post #35
post #18

I don't want my terminal badassified; I want to get work done. Rather than bling out my command prompt I simply try to do what real developer, data, and sysadmin badasses do: * Learn your shell language -- really learn it. Learn how to fit programs together, how to manage jobs, and all of the control structures in your shell language. Avail yourself of aliases and shell functions. * Learn the Unix command set, sed, a…

Right, sure - but you definitely - well, probably ;) - still want iTerm2! For Linux, try terminator: http://gnometerminator.blogspot.co.uk/p/introduction.html , or your package manager. There are doubtless tons of other options.

Why do you definitely still want iTerm2?

The only feature that I find even remotely compelling is mouse support, but so few programs handle mouse input that it largely doesn't matter. People always mention split panes, but I've never had a desire to vertically split my terminal window. If I ever did have such a desire, I'd probably just use tmux. And yes, iTerm2 claims to have some form of tmux integration, but I believe that's basically just using iTerm2 split panes to represent tmux panes, and I don't get why that's any better than just using tmux directly.

So besides mouse support and split panes, what does iTerm2 offer that Terminal.app doesn't? Some of the answers I've heard in the past are "256 colors" and "color themes", both of which Terminal.app supports.

Re: Badassify your terminal and shell

#39
post #38
post #35

Earlier quoted context omitted.

Right, sure - but you definitely - well, probably ;) - still want iTerm2! For Linux, try terminator: http://gnometerminator.blogspot.co.uk/p/introduction.html , or your package manager. There are doubtless tons of other options.

Why do you definitely still want iTerm2? The only feature that I find even remotely compelling is mouse support, but so few programs handle mouse input that it largely doesn't matter. People always mention split panes, but I've never had a desire to vertically split my terminal window. If I ever did have such a desire, I'd probably just use tmux. And yes, iTerm2 claims to have some form of tmux integration, but I bel…

I've tried using iTerm2's tmux support and found it to actually be less friendly than just using tmux directly. Definitely a YMMV thing, I suppose, but I was seriously baffled.

One thing I heard from several people in a previous discussion is that iTerm2 makes a thin outline around the terminal window and since they often have overlapping terminal windows (that are presumably opaque with black backgrounds), Terminal wasn't as usable. This has changed with Yosemite's Terminal, though.

Re: Badassify your terminal and shell

#40
Never heard of zsh-syntax-highlighting before, pretty cool feature! Apparently it's in zprezto, if you want to enable it, just add

      'syntax-highlighting' \
to your .zpreztorc (below "zstyle ':prezto:load' pmodule \" line)

and uncomment

    zstyle ':prezto:module:syntax-highlighting' highlighters \
      'main' \
      'brackets' \
      'pattern' \
      'cursor' \
      'root'
Post reply on HN