News for hackers. Stuff that matters.
Re:Ask HN: What do you love/hate about terminals? Would you ... by stevewillows on Wednesday December 27, 2017 @07:51AM (#16014458)
Have you checked out ZSH? It can do this nicely.
Re:Ask HN: What do you love/hate about terminals? Would you ... by signa11 on Wednesday December 27, 2017 @07:56AM (#16014484)
zsh via its ultra-tunable completions can do only 1st part of op's request i.e command option completion, but not the second part i think...

for example, i do the following:

    anupam@virat ~ % autoload -Uz compinit
    anupam@virat ~ % compinit
    anupam@virat ~ % git a<TAB>
    add        -- add file contents to index
    am         -- apply patches from a mailbox
    apply      -- apply patch to files and/or to index
    archimport -- import an Arch repository into git
    archive    -- create archive of files from named tree
edit-001: added trivial example.
Re:Ask HN: What do you love/hate about terminals? Would you ... by asgeir on Wednesday December 27, 2017 @08:20AM (#16014584)
My zsh autocompletion list for git add actually contains the stageable files. I don't know if this is stock zsh behaviour or related to my prezto https://github.com/sorin-ionescu/prezto config but it can be done

Edit: looks like it might be stock behaviour https://github.com/zsh-users/zsh/blob/master/Completion/Unix...

Re:Ask HN: What do you love/hate about terminals? Would you ... by ropeladder on Wednesday December 27, 2017 @10:58AM (#16015469)
Weird. I'm using Zsh and I swear I've tried that before with nothing happening, but it does actually work. Thanks!
Re:Ask HN: What do you love/hate about terminals? Would you ... by mtrycz2 on Wednesday December 27, 2017 @08:09AM (#16014541)
My (pretty much vanilla) zsh works quite nicely

https://i.imgur.com/SZqu63p.png

I'm not sure it covers all of the obscure commands you can think of, but 99% of the time it's great.

Re:Ask HN: What do you love/hate about terminals? Would you ... by btschaegg on Wednesday December 27, 2017 @08:50AM (#16014712)
As far as I can remember the only standard command I use and that my ZSH has trouble with is `dd`. Luckily, its arguments aren't that complicated.