Live data from Hacker News

Show HN: Inshellisense – IDE style shell autocomplete

github.com

31–40 of 161 posts

Re: Show HN: Inshellisense – IDE style shell autocomplete

#31
post #4

Earlier quoted context omitted.

Did you check the page? It's MIT-licensed and isn't about GPT or text generation. It's Intellisense, for the shell.

then what makes it better than withfig/autocomplete?

It's available for Linux and Windows.

Re: Show HN: Inshellisense – IDE style shell autocomplete

#33

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.

> It is very possible to write sub 100ms procedures in TS, […]

I won’t dispute this statement since I currently lack the means to assess inshellisense. Would it be possible for you (or someone with a functional Node + NPM setup) to install inshellisense and share the actual performance figures? You could use a tool like hyperfine (https://github.com/sharkdp/hyperfine) for this purpose.

As an attempt to test this myself, I used a Docker image (version 21.1.0-bookworm from https://hub.docker.com/_/node/). The TypeScript tool installed without any issues, along with the binding, which simply adds the following line into ~/.bashrc:

    [ -f ~/.inshellisense/key-bindings.bash ] && source ~/.inshellisense/key-bindings.bash
However, when I initiated a new Bash session within the same Docker container to activate the updated Bash configuration, I encountered the following error:

    bash: /root/.inshellisense/key-bindings.bash: line 1: syntax error near unexpected token `$'{\r''
    'ash: /root/.inshellisense/key-bindings.bash: line 1: `__inshellisense__() {
Due to this issue, I am unable to perform a performance test using hyperfine.

The version of Bash available in this Docker image is 5.2.15(1)-release.

I verified that the content of /root/.inshellisense/key-bindings.bash is exactly the same as https://github.com/microsoft/inshellisense/blob/main/shell/k...

Re: Show HN: Inshellisense – IDE style shell autocomplete

#35

Is this fully local? I glanced around and didn't see any mention of chatgpt/gpt/codex so I'm thinking it is?

There is really not much code to speak of, and a quick perusal didn't yield anything sus. Initial guess is that it's not very efficient, but I really didn't look that closely.

Re: Show HN: Inshellisense – IDE style shell autocomplete

#36

Earlier quoted context omitted.

This was the first thing I noticed, too. Why TypeScript? Is it: a) efficient enough, esp. compared to a Bash/Zsh/PWSH alternative, that spawning a JS interpreter for each autocomplete is no biggie? Is b) TypeScript just much more efficient than I thought? Or c) is TypeScript Microsoft's hammer, and everything looks like a nail?

I tend to think since VSCode plugins are javascript all new tooling from Microsoft seems to be written in typescript. As a non front end dev though `npm install` is an instant turnoff for me.

I agree. I was going to install and backed out when I saw `npm install` as well. I am wondering if my priors need to be updated, though (namely: JavaScript is slow, inefficient, and unsuited for anything outside of webdev).

Re: Show HN: Inshellisense – IDE style shell autocomplete

#39
post #4

Earlier quoted context omitted.

Did you check the page? It's MIT-licensed and isn't about GPT or text generation. It's Intellisense, for the shell.

then what makes it better than withfig/autocomplete?

It is withfig/autocomplete. The only difference from their runtime is that this gives results directly in the console, instead of using a graphical overlay. I believe that means you could use this in an SSH session.

Re: Show HN: Inshellisense – IDE style shell autocomplete

#40

Earlier quoted context omitted.

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.

100ms is a long time to wait for each completion suggestion.

I was going to say the same thing. In what world is 100ms fast on a computer? (for something not making a network round trip)
Post reply on HN