Live data from Hacker News

Love Your Terminal

blog.andrewhays.net

111–120 of 137 posts

Re: Love Your Terminal

#111
post #18

I am curious what terminal people use on Windows. I find MSYS to be very good, since it lets me work just as I would on Linux with Emacs-style editing.

Besides Console2 mentioned in another comment, there is also ConEmu (https://code.google.com/p/conemu-maximus5/), which incidentally has support for Clink (again mentioned in another comment!)

PS: There is also a somewhat extended version of Console2 here by a different author: https://github.com/cbucher/console which I like.

Re: Love Your Terminal

#112
post #48

Earlier quoted context omitted.

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.

I understand using that because it was what you had, but why would you choose to strip your prompt of useful information? (I'm not trying to degrade the idea here, just wondering what use case it provides. It could have a very good one.)

I've never had a difficult time telling the difference between where my prompt ends and where the result begins. I think too much grows absurd quickly, but a little bit of information is nice, I think.

Re: Love Your Terminal

#113
post #96

The prompt style I use was invented, IIRC, by one of the Bell Labs Unix guys in the early days of windowing terminals. : text ; Why? Because you can select entire lines (triple-click in most terminal emulators) and paste them directly into another shell. “:” is equivalent to true(1), and it ignores its arguments, the text . (In my case, the text is the base of the host name, but anything compatible with shell quoting…

This is the best post in the thread so far. I use ";" as a prompt sometimes, because it makes copy-paste easy (like you mention, just triple-click), but I often like to keep track of what directory I'm in. I typically just leave my prompt alone because I work on so many different machines, but this is pretty slick and simple.

Re: Love Your Terminal

#114

Earlier quoted context omitted.

Would have loved it, if worked on linux too.

You can always pull request on it. Linux support is on the roadmap, I would need some beta-testers though

You can check Linux battery status by just reading from a certain file somewhere under /proc; being Linux, I'm certain there's an equivalent buried somewhere in /sys as well. You just read the file, it gives you back ASCII text, you're all set.

Re: Love Your Terminal

#115
post #108

I'm going to plug a small CLI program I maintain -- autojump: https://github.com/joelthelion/autojump/#name It tracks which directories used most often so you can simply use `j ` to jump to that directory rather than type / tab-complete the full path name. It also does some fuzzy matching for mistyped names. For example: ~ $ j au ~/code/autojump $ j donw ~/Download $ j scra /scratch/03158/wting $

This plugin is great. I'd definitely recommend others to check it out. It's been a boon to my productivity since I've discovered it.

Re: Love Your Terminal

#116
post #26

In my scenario, I have to work on several tabs and splits for one topic/work (say it's Python work), and I usually have 2-3 topics in a day (office related, playing around, and maybe side-project stuff). I'm using tmux, and I tend to have 2-3 tabs for each topic, using only tmux to manage them is painful and ugly: there's too many tabs in the current display, and the default gnome terminal doesn't mix with the looks…

> using only tmux to manage them is painful and ugly: How is using tmux to manage them is painful?

tmux turns scrollback from "pretty simple" on a stock xterm or other terminal, to "absolute goddamn bullshit". That, combined with the fact that I quite like using "^b" to move my cursor around, means I don't use tmux as much as I possibly should. Yes, I know I could fix the ^b problem in a config file, but as I've said elsewhere, I work on about 6 different machines on a regular basis and don't have the patience to mess around syncing my configs.

Re: Love Your Terminal

#117
post #114

Earlier quoted context omitted.

You can always pull request on it. Linux support is on the roadmap, I would need some beta-testers though

You can check Linux battery status by just reading from a certain file somewhere under /proc; being Linux, I'm certain there's an equivalent buried somewhere in /sys as well. You just read the file, it gives you back ASCII text, you're all set.

Will add Linux support asap :)

Re: Love Your Terminal

#118
post #116
post #26

Earlier quoted context omitted.

> using only tmux to manage them is painful and ugly: How is using tmux to manage them is painful?

tmux turns scrollback from "pretty simple" on a stock xterm or other terminal, to "absolute goddamn bullshit". That, combined with the fact that I quite like using "^b" to move my cursor around, means I don't use tmux as much as I possibly should. Yes, I know I could fix the ^b problem in a config file, but as I've said elsewhere, I work on about 6 different machines on a regular basis and don't have the patience to…

> tmux turns scrollback from "pretty simple" on a stock xterm or other terminal, to "absolute goddamn bullshit"

tmux(and screen) scrollback is absolutely fantastic. Navigate with keyboard(and not just page-up page-down), have vim or emacs bindings, search backward...

> I work on about 6 different machines on a regular basis and don't have the patience to mess around syncing my configs.

As I said elsewhere, it takes about 2 minutes to copy ssh keys and scp dotfiles.

Re: Love Your Terminal

#119
post #96

The prompt style I use was invented, IIRC, by one of the Bell Labs Unix guys in the early days of windowing terminals. : text ; Why? Because you can select entire lines (triple-click in most terminal emulators) and paste them directly into another shell. “:” is equivalent to true(1), and it ignores its arguments, the text . (In my case, the text is the base of the host name, but anything compatible with shell quoting…

> The prompt style I use was invented, IIRC, by one of the Bell Labs Unix guys in the early days of windowing terminals. : text;

My prompt is two lines. The first line is info line followed by $ prompt on the next line. If I were so inclined, I would simply change the $ to ; or blank. I don't have to choose only one of them, but if that were the case, the verbose prompt would have stayed and ; would have gotten the boot.

Re: Love Your Terminal

#120
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!

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