Live data from Hacker News

Ask HN: What are your favorite terminal programs?

news.ycombinator.com

151–160 of 203 posts

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

#151
post #104
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…

Thanks for the links. In the future, please don’t use indentation to set off lists like this. It makes it difficult to read due to side scrolling, particularly on mobile. People often use - (hyphen) or * set of bullet points, and separate lines with new lines. You don’t get elements, but it does work. Plus, your links will work, too :)

The problem isn't using indentation. The problem is the platform's rendering on mobile.

Agree on links tho.

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

#152
REQUEST: jq is great for json - but is there a "jq for xml"?

Some webservices are still only available in xml (e.g. uv levels). I currently use XMLStarlet for xml in the terminal. There are extra annoyances in xml that you can't avoid (like namespaces), but it could be a lot closer to jq.

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

#153
post #104

Earlier quoted context omitted.

Thanks for the links. In the future, please don’t use indentation to set off lists like this. It makes it difficult to read due to side scrolling, particularly on mobile. People often use - (hyphen) or * set of bullet points, and separate lines with new lines. You don’t get elements, but it does work. Plus, your links will work, too :)

The problem isn't using indentation. The problem is the platform's rendering on mobile. Agree on links tho.

Given that we're members of HN (as opposed to someone running the site), I try to provide constructive advice that others can actually use to improve the situation. The admins are well aware of the situation; continuing to argue that it's a problem with the platform while refusing to do what you can to work with the given situation seems like a needless waste of a comment.

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

#154
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…

> you shouldn't really need a dedicate script to do that

It isn't because the terminal is mis-configured and/or mis-interpreting those characters, it's because these characters have historically been used in a special way by troff's ascii output driver, as used by the man command.

Bold characters are "emulated" by outputting the character itself, followed by ^H, then by repeating the character, and underline is emulated by outputting _ (the underscore character) followed by ^H, followed by the character to be underlined. This is the same way that bold/underline was achieved on a manual typewriter or by old teletype terminals with paper output.

Pagers like "more" & "less" have in-built behaviour that knows how to interpret these sequences and render bold or underline appropriately, and if you "cat" the file your terminal would probably ignore them, but if you open a file with those sequences in a text editor, you're going to see a bunch of unnecessary ^H characters. The OP's script uses the "col" command to remove the unnecessary ^Bs (and the preceding character) that troff has output.

By default, GNU groff doesn't actually output those sequences anymore and uses ANSI escape codes instead. AFAIK many (most?) distributions actually compile out the ANSI behaviour in favour of the old way though (because "more" and "less" don't actually behave correctly with the ANSI characters by default), but some don't, which breaks the script (it's broken in Cygwin, for instance).

FWIW, if you need a fool-proof way to convert a man page to plain old ASCII with no escapes at all, it's easiest just to redirect the output of "man" to a file:

    man ls > ls.txt
The long-winded way (with groff) is something like:

    zcat /usr/share/man/man1/ls.1.gz | groff -man -Tascii -P -cbdu > ls.txt

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

#155
post #153

Earlier quoted context omitted.

The problem isn't using indentation. The problem is the platform's rendering on mobile. Agree on links tho.

Given that we're members of HN (as opposed to someone running the site), I try to provide constructive advice that others can actually use to improve the situation. The admins are well aware of the situation; continuing to argue that it's a problem with the platform while refusing to do what you can to work with the given situation seems like a needless waste of a comment.

Protests sometimes succeed.

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

#156
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.

> we are a site full of programmers

Exactly! And we all know how good most programmers are at UI design ;-)

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

#157

Earlier quoted context omitted.

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…

Sure making things more usable may sometimes have trade-offs. But I'm struggling to think of the disadvantage of basic markdown support on a site where everyone knows markdown, and even assumes it is supported. People are constantly posting markdown lists that end up all on one line.

I assume the reason it hasnt been fixed is that nobody can be bothered, which is fine. But it's still a little embarrassing. Kind of like how Stackoverflow doesn't support triple backticks. I often see questions with formatting screwed up because people assume a site that heavily relies on markdown supports an extremely common markdown feature.

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

#158
post #9

MPS-Youtube is extremely useful if you don't mind the CLI and want to quickly play a YouTube video. translate-shell if you're a language person. Very complete interface to most popular translation services. atools(aunpack, apack, als, etc) for quick archive manipulation if you're lazy.

mpv + youtube-dl plugin are also a nice combination, especially for live streams.

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

#159
post #154
post #97

Earlier quoted context omitted.

> 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…

> you shouldn't really need a dedicate script to do that It isn't because the terminal is mis-configured and/or mis-interpreting those characters, it's because these characters have historically been used in a special way by troff's ascii output driver, as used by the man command. Bold characters are "emulated" by outputting the character itself, followed by ^H, then by repeating the character, and underline is emula…

Ah fair enough. The few times I have seen this issue was when jumping on old Solaris SPARC boxes which also mangled the the backspace key in the interactive terminal. So it sounds like I've put 2 and 2 together and gotten 5.

Though coincidentally I do the redirect trick a lot as was as querying the gzipped raw files too (one of the projects I'm working on requires building a cutdown man page parser).

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

#160

Since all the good suggestions are taken, I want to mention a couple of diversions: fortune: prints something silly or thought-provoking. You can get extra fortune cookie files or add your own. cowsay: prints an ascii-art cow (or other creature) with a speech-bubble filled with the text of your choice. You can pipe fortune into cowsay for extra fun. $ fortune | cowsay ______________________________________ / Publishi…

These days, there's also:

https://github.com/erkin/ponysay

My latest find is to use a combination of weechat and wee-slack for most of my slack usage (it's note quite there when it comes to editing, or in-line reactions). But works well for the chat part:

https://weechat.org/

https://github.com/wee-slack/wee-slack

As a former BitchX and sometime irssi user, weechat feel cozy. And it doesn't eat all your ram just for chat.

Post reply on HN