News for hackers. Stuff that matters.
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by colonelpopcorn on Tuesday May 25, 2021 @12:55PM (#27279274)
You can stop at #1. Why do I need this when oh-my-zsh exists?
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by quickthrower2 on Tuesday May 25, 2021 @02:43PM (#27280626)
As soon as I saw the title I anticipated the Dropbox conversation!

I’m guessing people like me who use the shell as a means to an end. Honestly most of the time I’m using git bash “coz it’s there” and hate typing in commands. I actively avoid it. I installed LENS for kubernetes to avoid it.

I’d rather write a script in an IDE and run that than be working at the command line. Because then I can treat it like code, review before running and it’s repeatable.

I really get the benefits of this tool but I won’t use it because I prefer to avoid excessive command line use - preferring GUI and scripts BUT I do get why it is useful if I have to do interactive command line sessions

Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by mschrage on Tuesday May 25, 2021 @08:31PM (#27284649)
Out of curiosity, do the scripts you write take options or arguments? Or are they generally just invoked directly?
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by quickthrower2 on Tuesday May 25, 2021 @08:55PM (#27284813)
Sometimes arguments and sometimes not.

Often the argument is simply test vs prod. So I can run it on my machine but also run it from Travis ci.

Any connections or secrets would be in the environment. For local I’d create another script to set them up and call the first script. Why? So the secrets don’t end up in the repo by mistake.

Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by Exuma on Tuesday May 25, 2021 @01:20PM (#27279596)
which oh-my-zsh plugins do you use that can do this? Is there an all-encompassing one or do you need to download tons of different ones like a docker plugin, git plugin, etc
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by mjochim on Tuesday May 25, 2021 @02:41PM (#27280593)
I’ve been using grml’s zsh config [1] for years. It’s one file, I’ve never installed a single plugin, and it’s been doing a lot. Couple of examples:

- When I auto-complete a path, the shell prints all options and I can navigate between them with either tab or arrow keys

- For many tools, like git, auto-completion shows an annotated list of possible options/subcommands (and again, you can navigate them with tab or arrow keys)

- If I type something like chmod 644 and then start auto-completing the filename, the suggestions exclude every file that is already 644.

Also, there is a format to add auto-complete information for more tools. I’ve never actively used it, though, and I don’t know if it’s been adopted by any other shell/tool. I don’t even know if it’s specific to zsh or to grml’s config or to something else entirely. It has just stayed out of my way, while greatly facilitating my shell usage.

As a last point, none of these examples have been added recently. They have all been there for years.

This is not to pick on fig, but rather to show what zsh has been doing all along (and I suppose other shells like fish, too, but I’ve never tried).

[1] https://grml.org/zsh/

Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by kubami on Tuesday May 25, 2021 @02:39PM (#27280570)
But I think it will be the same with Fig. They will take the autocomplete scripts from the vendors and integrate them with Fig.
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by nerdponx on Tuesday May 25, 2021 @01:25PM (#27279666)
They are totally different things. This is like asking why you need a computer at home when you already get the newspaper delivered every morning.
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by Blahah on Tuesday May 25, 2021 @02:27PM (#27280425)
It's the other way around. Why buy this newspaper when I already have a computer?
Re:Launch HN: Fig (YC S20) – Autocomplete for the Terminal by nerdponx on Tuesday May 25, 2021 @06:10PM (#27283373)
Ok, sure. The analogy is silly anyway, but silly arguments beget silly analogies.