Live data from Hacker News

Ask HN: What are your favorite terminal programs?

news.ycombinator.com

121–130 of 203 posts

Re: Ask HN: What are your favorite terminal programs?

#121

history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n10 1 167 16.7% git 2 130 13% ll 3 94 9.4% clear 4 90 9% make 5 80 8% cd 6 57 5.7% e 7 52 5.2% cat 8 45 4.5% man 9 38 3.8% valgrind 10 37 3.7% rm Where ´e´ is an alias for ´vim´.

I can copy/paste your statement and it works.. but when I try to save it as an alias method.. I keep getting error: awk: cmd. line:1: {CMD[]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;} awk: cmd. line:1: ^ syntax error awk: cmd. line:1: error: invalid subscript expression I thought I would just escape the double quotes ", and things would work. :/ Any ideas?

  alias mostused='history | awk '\''{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}'\'' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl |  head -n10'

Re: Ask HN: What are your favorite terminal programs?

#122

Emacs. Just ensure you're running a 256-bit color terminal emulator, and for most uses it doesn't even differ that much from the GUI version. Recently I've been doing a lot of work by SSH-ing to my desktop machine from a small netbook and using the terminal Emacs client. If you run Emacs in server mode, the transition is so smooth that at this point, I don't bother getting out of bed if I need to work on something la…

Agreed. I also like to use TRAMP [1] for remote editing files in Emacs: it gets a local copy of a file you're editing so that it only requires a connection when you save/load (as opposed to constantly streaming Emacs over SSH). Not suitable for all tasks, but it means I'm rarely at the mercy of my lackluster internet connection.

[1] https://www.emacswiki.org/emacs/TrampMode

Re: Ask HN: What are your favorite terminal programs?

#123

Earlier quoted context omitted.

Guessing 'll' is an alias for 'ls -al' or similar as well?

It's a common alias in Ubuntu systems I believe.

I'm just doing a confirmation, since I personally completely overwrite the .bashrc with my own, eliminating any default aliases.

Re: Ask HN: What are your favorite terminal programs?

#124

Earlier quoted context omitted.

git-standup seems cool, but misses the one thing I would want from it: show me the commits I've made from each repo that I work in, sorted by time. That way I can see that I made commit 1 in repo X, then commit 2 in repo Y, then commit 3 in repo X. Also instead of "-d 4" to see 4 days ago, "January 15th" or "Thursday" would be handy.

> show me the commits I've made from each repo that I work in, sorted by time It does show the commits from each repo sorted by time. Repositories are not sorted though, if that is what you are asking for.

Yeah, I'm only interested in the actual flow of all my work, not the flow of my work in individual repos. I can use 'git log' to list my work in a single repo.

Re: Ask HN: What are your favorite terminal programs?

#125
GCE (Global Commands Execution), which is a desktop application that provides a single context to manage and run multiple scripts.

https://github.com/Dewep/GCE

Why?

As web applications are being split in micro services and independant entities, it becomes harder and harder to setup a local dev environment and you have to handle dozen of shell terminals.

GCE aims to take that pain away by offering you the ability to configure the setup of your projects once and run it in the blink of an eye.

Re: Ask HN: What are your favorite terminal programs?

#126

Here are some of my favorites that I use daily: - tmux - mutt - email client - wyrd + remind - calendar - ledger - double-entry accounting tool - weechat + weeslack plugin - fully featured, super fast slack from the CLI

+1 for remind and wyrd. Remind is really, really powerful. You can express things like an appointment that fires "every 3 weeks starting May 4th, but if that day falls on a weekend or holiday then {skip it, move it to the following/preceding weekday that isn't a holiday}", and lots more. Wyrd is a really nice console frontend to remind (I just found that there are graphical frontends available too). Finally with rem2ics you can express really complicated things in Remind and then export the results as an iCalendar-compatible format and import that into whatever other calendar you want.

I used screen, remind+wyrd, mutt, and irssi (and even ledger) in school; I got a job at a bigco that pretty much required me to use gmail and gcal, and I stopped using console things as much. Lately I've been toying around with moving my mail flow back into console / console-ish inside emacs.

This brings back all kinds of memories: https://www.roaringpenguin.com/wiki/index.php/Remind_use_cas...

Re: Ask HN: What are your favorite terminal programs?

#127
post #36

Written in Rust: - fd: A simple, fast and user-friendly alternative to 'find' https://github.com/sharkdp/fd - ripgrep: ripgrep recursively searches directories for a regex pattern https://github.com/BurntSushi/ripgrep - exa: Replacement for 'ls' written in Rust https://github.com/ogham/exa - bat: A 'cat' replacement. I recommend following the customizations. https://github.com/sharkdp/bat Written in Python: - asciine…

I wish HN handled long horizontal scrolling lines on mobile better. It’s aggravating that we are a site full of programmers and we can’t get the basics of usability in 2018.

One thing that I think most people don't consider often is that making things more usable isn't always good. Medium and message are interlinked. If everyone in the world switched to mobile, it would change the content of the articles we read and it would change the discussion of those articles. When you make something more usable on a different platform, you're encouraging the biases that the platform compels. In the case of mobile this means encouraging shallower content and briefer discussions, among other things.

Re: Ask HN: What are your favorite terminal programs?

#128

ncdu to analyze disk space and find huge folders you can clean And `z` (the zsh plugin) to cd into your most common directories

Thanks for sharing - I did not know about ncdu. I typically do a series of "du -s -h * | sort -h" and this simplifies things.

wow, learned about that flag to sort today, thanks. I've been just doing "du -s | sort -n"

Re: Ask HN: What are your favorite terminal programs?

#129
post #77

Emacs. Just ensure you're running a 256-bit color terminal emulator, and for most uses it doesn't even differ that much from the GUI version. Recently I've been doing a lot of work by SSH-ing to my desktop machine from a small netbook and using the terminal Emacs client. If you run Emacs in server mode, the transition is so smooth that at this point, I don't bother getting out of bed if I need to work on something la…

If you don't have a reason to use Emacs from the terminal emulator, use the GUI. And for SSH, it's very hard to reject Tramp. One must is to make it less verbose though: (setq tramp-verbose 1). Then it becomes faster (at least in my perception) and way less noisy.

I find using emacs in the terminal less bothersome on osx because of osx's inane out of the box window management; I can replace it completely with managing emacs frames in screen and that experience doesn't change when I move between platforms.

Re: Ask HN: What are your favorite terminal programs?

#130
post #97
post #74

Linux has hundreds of them, in the various bin directories. Many are interesting. This shell snippet lists all the directories in $PATH, using less, so you can page through them: for dir in `echo $PATH | sed 's/:/ /g'` do echo Listing dir: $dir ls -l $dir | nl done | less I came across the watch command recently, which seems useful, and wrote something like it in Python: A Python version of the Linux watch command: h…

> Also, for saving (and then viewing) man pages (about commands or other topics), without the formatting characters (such as ^H), on some Linux distros, I find this useful: ^H is one of the two backspace characters (the other being ^?) depending on which VT standard you're configured to use. So you shouldn't really need a dedicate script to do that as it's just a problem between your pseudo-TTY (Linux console) and yo…

Thanks for your inputs. A few comments:

I first created that script called m years ago on some Unix boxes that I was using. Could have been HP-UX or other version. And I've used it over the years on many Unix and Linux versions that I worked on. It could be that in some cases, the script is needed due to a tty or TERM or other configuration issue. But I'm pretty sure that I've had the need for it (to remove those control characters) on at least some systems where such config was okay. I know this because, while I do tweak env. var., stty and other settings now and then, I do not always (need to) do so, and have still found control chars [1] in the man output, even when redirecting to file. That is why I created the script, because when working on a C, Python or any other project where I need to read man pages, I often like to redirect the man output to a file (in my ~/man dir) and then read them using vi/vim.

[1] See what I say in that post (about m) about nroff and troff.

Also, I do know about stty, have used it for years, although there is less need for it these days. Used to do a lot of tweaking and experimenting with the erase option (for which, BTW, instead of backspace key in your example, we can also write a literal ^h, i.e. caret, then letter h), intr option, onlcr, ocrnl and others. Used to be good fun and sometimes frustrating too, because docs for this areas were somewhat lacking then.

Post reply on HN