Live data from Hacker News

Ask HN: Best Command-Line Applications?

news.ycombinator.com

321–330 of 393 posts

Re: Ask HN: Best Command-Line Applications?

#321
post #165
post #48

Earlier quoted context omitted.

It's been mentioned previous, but you should check out ripgrep - it's even faster than Silver Searcher a lot of the time https://github.com/BurntSushi/ripgrep

Does anyone not working on million-line codebase ever find themselves limited by grep? I am genuinely curious.

Unfortunately, I work on a million-line codebase.

Grep might be fine 99% of the time, but there's no reason to not drop a ripgrep binary on every machine I use regularly.

Ripgrep is faster across the board and has better defaults for working in Git repositories. Since I'm working with a large codebase managed in Git, it's a no-brainer.

Re: Ask HN: Best Command-Line Applications?

#322

Earlier quoted context omitted.

> no admin rights needed, > Make sure Powershell 3 (or later) and .NET Framework 4.5 (or later) are installed. Yeah not exactly. Wouldn't work in most ( all ? ) the places I worked at.

Really? PS 3.0 was integrated as of Win 8 / Server 2012. In 7 and 2008/2008R2 it was in service pack 1.

Yes it is installed. But script execution is pretty much always disabled through group policy

Re: Ask HN: Best Command-Line Applications?

#323

I use the following (in no particular order) -- definitely nothing fancy. * weechat * ffmpeg * youtube-dl * zsh * watchman ( https://facebook.github.io/watchman ) * megadl (rarely, but its a handy tool when you need it) * brew (on my mac) * mountsshfs (on my mac) --- I moved away from orgmode and have been using it in VS since I have it open anyway. It covers me. I also want to start using Mutt or something similar.…

This doesn't look to take commands after a pipe into account so IMHO doesn't accurately reflect command usage. For example running above I was surprised awk wasn't in the list but when I went to investigate I found I almost always am piping something to awk.

Hmm yeah. And often I type multiple commands separated by semicolons, which it bunches together as one. Also that and long paths meant mine was very unpretty. Speaking of AWK, this uses the same flawed method, looks nicer (for my history), and is shorter:

  history | awk '{a[$2]++} END{for (i in a) print a[i]"\t"i}' | sort -n | tail

Re: Ask HN: Best Command-Line Applications?

#324

Earlier quoted context omitted.

I love fish-shell, but after years of using it I switched to Oh My ZSH! . The bash compatibility makes it a whole lot easier to use when you're the type of person who has to look up "how to do X on the command line" on the internet more often than you'd like to admit (that would be me). https://ohmyz.sh/

fwiw, we are shipping a number of features in fish 3.0 (any day now!) that are specifically targeting at maximizing compatibility with most bash scripts (still not POSIX). That includes support for && and || and a few other things that should go a long way towards making most code you find drop-in ready.

Really? Doesn't that go against the stated fish design document and ridiculousfish's intention for fish?

I'm more concerned about making fish scripts work well than making fish run bash scripts. (Maybe fish 3.0 will improve that too.) I've tried to use fish for writing somewhat serious scripts several times, and I've always run into frustrating problems that sent me back to bash for scripting. Fish is an excellent interactive shell, of course.

Re: Ask HN: Best Command-Line Applications?

#326

Earlier quoted context omitted.

fwiw, we are shipping a number of features in fish 3.0 (any day now!) that are specifically targeting at maximizing compatibility with most bash scripts (still not POSIX). That includes support for && and || and a few other things that should go a long way towards making most code you find drop-in ready.

Really? Doesn't that go against the stated fish design document and ridiculousfish's intention for fish? I'm more concerned about making fish scripts work well than making fish run bash scripts. (Maybe fish 3.0 will improve that too.) I've tried to use fish for writing somewhat serious scripts several times, and I've always run into frustrating problems that sent me back to bash for scripting. Fish is an excellent in…

You can see the discussions on GitHub but @ridiculousfish authored that series of commits fwiw.

However with regards to your other matter, I personally just finished rewriting the job control code to close out a lot of long standing bugs affecting correctness and child process behavior in complicated scripting cases, and other members like @faho have done an amazing job fixing up some of the builtins and scripting-related improvements as well as putting in insane effort into the interactive behavior of the shell and its insane library of completions.

Try the current fish master builds and see how if fares. If you have any specific concerns, please file a GitHub issue. It’s an open source project and it can only succeed with the help of the entire community.

fwiw I find the sanity fish brings to process substitution with sane tokenization and automatic escaping of shell substitution output to be a huge boon to productivity over writing in (ba)sh. These days, my scripts are either written in ninja or bmake if they are rule/output driven or fish otherwise.

Re: Ask HN: Best Command-Line Applications?

#327

Cli-junkie brofist! I only drop out of the command line for occasional one-off browser stuff. Depending on your current familiarity with things, I can't recommend enough simply combing through the tools in coreutils , util-linux , find-utils etc. If you take just three or so a day, by the end of a few months you'll have a solid survey-understanding of what almost every *nix shell has available. Apart from that, here…

> git-annex is not a filesystem or Dropbox clone. However, the git-annex assistant is addressing some of the same needs in its own unique ways. (There is also a FUSE filesystem built on top of git-annex, called ShareBox.) So I assume you made it work like Dropbox for you anyway. How did that go?

The "a better Dropbox" comment was quite tongue in cheek. You can think of git-annex as a way of managing files in git without managing the contents, which is exactly what we want for binary blobs like PDFs, word documents, whatever.

The syncronization between computers is done essentially how one would do it with git. Personally, I sync to a private VM host so the content is available "in the cloud".

At the moment I just sycn everything manually, but it's possible to setup git-hooks to make it automatic. git-annex is nice for power users, since it allows fine grained control of where to keep what content. The file metadata is stored in git, but you choose when and how to pull or push the actual files themselves.

That makes it possible to sync cross sections of an entire library, for example. This is how I manage what to put on my kindle and what to keep off it.

Re: Ask HN: Best Command-Line Applications?

#328

Cli-junkie brofist! I only drop out of the command line for occasional one-off browser stuff. Depending on your current familiarity with things, I can't recommend enough simply combing through the tools in coreutils , util-linux , find-utils etc. If you take just three or so a day, by the end of a few months you'll have a solid survey-understanding of what almost every *nix shell has available. Apart from that, here…

Try googler and you can browse from the command line.

If you like that, then you might like surfraw[0].

The main problem is that these don't really obviate the need for a browser, they just make it easier to open said browser tab from the command line.

[0]:https://gitlab.com/surfraw/Surfraw

Re: Ask HN: Best Command-Line Applications?

#329

Earlier quoted context omitted.

Try googler and you can browse from the command line.

If you like that, then you might like surfraw[0]. The main problem is that these don't really obviate the need for a browser, they just make it easier to open said browser tab from the command line. [0]: https://gitlab.com/surfraw/Surfraw

In order to load browser bookmarks from the command-line, I use this shell script:

  #!/bin/bash --
  f0() {
    echo 'select moz_bookmarks.title || '"'"' = '"'"' || url from moz_places, moz_bookmarks on moz_places.id = moz_bookmarks.fk where parent = 2;' | sqlite3 /home/user/.mozilla/firefox/twht79zd.default/places.sqlite
  }
  f1() {
    firefox `echo 'select url from moz_places, moz_bookmarks on moz_places.id = moz_bookmarks.fk where moz_bookmarks.title = '"'$1'"';' | sqlite3 /home/user/.mozilla/firefox/twht79zd.default/places.sqlite`
  }
  f$# $1
You will need to modify it for your use, such as by changing the filenames. I also made another shell script to load Wikipedia.

However, is also my opinion making many thing which do not need a web browser and can just be the command-line programs.

Re: Ask HN: Best Command-Line Applications?

#330
post #162
post #113

Earlier quoted context omitted.

A few of these (all?) are TUIs and not CLIs. CLIs are command driven. TUIs are driven by user interactions. I'm sure more/better distinctions between the two can be made.

that's a fair point, but i don't think that's what the OP meant. CLI is commonly used to cover TUI when pittet against GUI. greetings, eMBee.

On one hand it's in the acronym command line interface and on the other

"was wondering if anyone had any solid recommendations for applications that one can use in a terminal window" it really looks like he meant to express console apps not cli I think you are correct.

Post reply on HN