Live data from Hacker News

New(ish) command line tools

jvns.ca

241–250 of 252 posts

Re: New(ish) command line tools

#241
post #240
post #213

#ifdef NOFLAME Curiously most of those tools implement things Emacs have since decades. Obligatory #define NOFLAME, I was and to a certain extent a unix guy but after having jumped the ship to Emacs I start seeing in practice many aspects of unix inferiority respect of classic systems, far beyond the Unix Haters Handbook. File renaming? Dired do that and more than many modern tools, not only in mere editing (wdired-m…

> Emacs itself seems to have seen a sort of resurgent popularity and that's make me think: did we need so much time to learn? Resurgence? Google tells me otherwise... https://imgur.com/a/urcePZq

Emacs community on Reddit, GH etc have grown and grown in peoples not really from IT, new lawyers, astronomers, ... ask for Emacs and that's for me means a growing interest, probably still too little to makes Google Trend changes, but clearly perceivable. Beside that real statistics are next to impossible so I can just tell what I see, and that's not a real statistic anyway...

Re: New(ish) command line tools

#242
post #52

broot completely changed the way I navigate directories on the CLI over the past year. I was an 'ls' purist before, I've tried various CLI file managers in the past and they all felt like they added too much friction, with the one exception of nnn which I briefly used before finding broot, which just feels really fluid and natural.

broot can't run commands on, let alone select, multiple files. A real shame.

Re: New(ish) command line tools

#243
post #126

Earlier quoted context omitted.

This is amazing! Is it possible to do the following somehow? - automatically have this for any command that outputs more than 10 lines? - automatically exit when the main command (for example a dev server) exits? - print the output of the main command to stdout after this is done?

> automatically have this for any command that outputs more than 10 lines? Probably not. The output of a command typically goes directly to the terminal and does not pass through the shell, so the shell has no idea how many lines there are. You could write a shell where that's not the case, but that would have issues with interactive things - what happens if you run e.g. vim or htop in that context? You can pipe to `…

More likely is a feature to skip processing on short outputs, like `less -F`

``` -F ........ --quit-if-one-screen Quit if entire file fits on first screen. ```

Re: New(ish) command line tools

#244
post #196

None of the "replacements" interest me. When I try the "new" ones I cannot get interested in them either. When trying new programs I am looking for whether a program can do something essential that I cannot do myself, e.g., with shell scripts. However I am beginning to think another reason is that these "new" utilities are consitently too complicated, e.g., too many options. It often seems as if the authors are tryin…

Classic UNIX tools are god awful to use in terms of quality of life. Newer tools are far more ergonomically pleasing. The real reason people are hesitant to use new tools is that there is a massive switching cost for most of them.

I find the older utilities are more "ergonomically pleasing" and improve "quality of life" given the generally poor quality of today's software. Indeed the "switching cost" would be high, as I would lose the ergonomic pleasure and quality of life improvement, not to mention the level of efficiency and productivity, I get from the "classic" UNIX utilities.

Re: New(ish) command line tools

#245
post #197

Earlier quoted context omitted.

From the PV man page ( https://linux.die.net/man/1/pv ) > A more complicated example using numeric output to feed into the dialog(1) > program for a full-screen progress display: ... > Frequent use of this third form is not recommended as it may cause the programmer to overheat. ^- is that a wisecrack hidden in an otherwise serious man page?

PSA: don't use linux.die.net. It's horribly outdated. This sentence was removed from the man page in pv 1.4.0, released in December 2012.

Just happened to be the first result that came up, but good to know.

Re: New(ish) command line tools

#246
post #22

Earlier quoted context omitted.

> I recently found out about mdp too, a way to display markdown in the terminal as slides. > https://github.com/visit1985/mdp I use pandoc to convert markdown to powerpoint decks, it's a great workflow as you can preview and tweak the content and then apply the firm theme before the presentation.

Do you mean actual PowerPoint or just creating a (presumably HTML based) presentation?

actual pptx file:

pandoc -f markdown input.md -o output.pptx

Re: New(ish) command line tools

#248

Earlier quoted context omitted.

Given that I'm guaranteed to forget that I have this thing installed if I would install it, I'm just going to steal the idea and try to remember to use my editor instead of an ugly shell loop next time I want to rename many files. There's only a small difference, really, between transforming `1.txt 2.txt 3.txt` to `file1.md file2.md file3.md` and transforming to `mv 1.txt file1.md; mv 2.txt file2.md; mv 3.txt file3.m…

You likely already know this, but just a reminder/tip that bash and zsh will let you edit the current command you’re entering in your editor of choice if you press ctrl+x ctrl+e (without releasing ctrl between). (Note if you’re using zsh without ohmyzsh, you’ll have to enable this manually [1]) [1]: https://nuclearsquid.com/writings/edit-long-commands/

I don't see how the shell could know whether you released the Ctrl key?

Re: New(ish) command line tools

#249

Earlier quoted context omitted.

How does nnn compare to ranger https://github.com/ranger/ranger ?

ranger is fancier (both visually and in terms of configurability), but nnn is significantly faster in my experience. I kept putting off looking into ranger's rifle capabilities and Python scripting, but after having it crash on me a couple times - in a directory with many hundreds of files, to be fair - I tried nnn. The speed and simplicity made me switch over entirely, because it has just the right amount of feature…

You can set glow (https://github.com/charmbracelet/glow) as the markdown previewer in nnn if you use a customer opener.

Re: New(ish) command line tools

#250

I really like the approach of pipe-rename ( https://github.com/marcusbuffett/pipe-rename ) for renaming many files. It's especially convenient for people who can efficiently edit many lines in their favorite text editor (so everybody here, I guess). Main problem: you maybe don't do this kind of operation frequently enough to remember how it's called or how you aliased it.

ls | % {rename-item $_ -newname $('myfile_' + ($_.BaseName -replace '\D') + '.md' )} No need to remember anything.

This is a lot to remember, and a typo could mess things up badly.
Post reply on HN