I wish they had written inShellisense in a more efficient programming language than TypeScript. I recall disabling bash_completion.sh on my computer some time ago due to its negative impact on the startup speed of each iTerm2 session and the delay it introduced when using the key for autocompletion. Before I disabled this feature, I consistently experienced delays of over 300ms between triggering autocomplete and rec…
Don’t bring TypeScript into this. It is very possible to write sub 100ms procedures in TS, but an inelegant algorithm will be slow in any language, eventually.
Show HN: Inshellisense – IDE style shell autocomplete
131–140 of 161 posts
Re: Show HN: Inshellisense – IDE style shell autocomplete
#132This is cool. What is sad is that it has to rely on a library of completion specs. It shows what kind of stone age foundations we are building on top of. The world would have been a much better place if CLIs themselves defined strict interfaces using standard data structures. Not only for auto completion, also gives much more accurate error checking of bash scripts. Same goes for data piped in and out of command.
Well it's not too late just yet.
How about if all CLI exes had an option, say --dump-cli-options, that wrote out a spec of the supported commands/flags/options?
Something like e.g. Python's argparse should be able to effortlessly spit out this info (and the same for other similar argument parsing libraries).
Re: Show HN: Inshellisense – IDE style shell autocomplete
#133From there, :wq will drop the text back into your command line. If you have Copilot set up in either of those, then it will also work here.
I know from working on https://github.com/hiAndrewQuinn/shell-bling-ubuntu that Neovim's LazyVim setup now supports Copilot out of the box now. I never had much trouble setting up the Vim plugin either. YMMV.
Re: Show HN: Inshellisense – IDE style shell autocomplete
#134This is cool. What is sad is that it has to rely on a library of completion specs. It shows what kind of stone age foundations we are building on top of. The world would have been a much better place if CLIs themselves defined strict interfaces using standard data structures. Not only for auto completion, also gives much more accurate error checking of bash scripts. Same goes for data piped in and out of command.
> The world would have been a much better place if CLIs themselves defined strict interfaces using standard data structures. Well it's not too late just yet. How about if all CLI exes had an option, say --dump-cli-options, that wrote out a spec of the supported commands/flags/options? Something like e.g. Python's argparse should be able to effortlessly spit out this info (and the same for other similar argument parsi…
This could be used to do "form validation" of CLI args as they're typed in the shell.
Re: Show HN: Inshellisense – IDE style shell autocomplete
#135Re: Show HN: Inshellisense – IDE style shell autocomplete
#136Alternatively, if you simply wish to occasionally bring Copilot into your shell, you should know that Ctrl+X Ctrl+E (on bash) / Alt+E (on fish) will open your current shell line up in $EDITOR, which you may set to Vim or Neovim. From there, :wq will drop the text back into your command line. If you have Copilot set up in either of those, then it will also work here. I know from working on https://github.com/hiAndrewQ…
zsh starts minimal, so one needs the following for such a feature to be operational:
# enable
autoload edit-command-line
zle -N edit-command-line
# bash-like emacs mode shortcut
bindkey "^X^E" edit-command-line
# bash-like vi mode shortcut
bindkey -M vicmd v edit-command-lineRe: Show HN: Inshellisense – IDE style shell autocomplete
#137This is cool. What is sad is that it has to rely on a library of completion specs. It shows what kind of stone age foundations we are building on top of. The world would have been a much better place if CLIs themselves defined strict interfaces using standard data structures. Not only for auto completion, also gives much more accurate error checking of bash scripts. Same goes for data piped in and out of command.
Re: Show HN: Inshellisense – IDE style shell autocomplete
#138This is cool. What is sad is that it has to rely on a library of completion specs. It shows what kind of stone age foundations we are building on top of. The world would have been a much better place if CLIs themselves defined strict interfaces using standard data structures. Not only for auto completion, also gives much more accurate error checking of bash scripts. Same goes for data piped in and out of command.
It's sad. If the world of software had better coordination and cooperation, we would be able to get so much more done. Instead we're constantly dumping and re-parsing the same data, re-implementing the same protocols and algorithms in dozens of different languages, each time with different quirks. Fixing the same bugs again and again.
Re: Show HN: Inshellisense – IDE style shell autocomplete
#139The name is terrific.
Re: Show HN: Inshellisense – IDE style shell autocomplete
#140Earlier quoted context omitted.
I feel like I've trashed millions of files I shouldn't have with `rm` and trying to be clever with regular expressions.
I've done this enough times I use `ls` first, then `rm`