terminus icon indicating copy to clipboard operation
terminus copied to clipboard

Autocomplete

Open nullvariable opened this issue 6 years ago • 3 comments

Adds a feature for #1595

Provides an autocomplete feature compatible with zsh and bash-completion. Allows for easy tab completion in supported shells.

I may have over complicated this, but in order to minimize the distribution size I've adopted a strategy for caching the autocomplete script. This allows us to only generate the autocomplete script when building the phar file, since we don't need the script to be dynamic. I suppose one downside of this is that it may not pickup plugins.

Very open to additional thoughts and improvements. Currently requires that you set the following in your .zshrc file:

eval "$(terminus autocomplete)"

terminus-autocomplete

nullvariable avatar Oct 11 '19 11:10 nullvariable

Would love to see this merged. In the meantime @nullvariable or @stevector can you educate my noob self on how the composer solution works? Do I need to install composer on all the machines i want autocomplete to work with or just on the client i am SSH'ing from? This seems like a pretty big oversight on the termius devs part. Thanks for any help! TAB autocomplete === 👼

dwasyluk avatar Nov 30 '19 06:11 dwasyluk

@dwasyluk composer is only needed if you're building terminus from source. If you're using the packaged phar version, composer isn't needed.

Right now to use this branch you would have to install composer and generate the phar file yourself, but that phar is portable and you could use on any machine with php. Once this is completed and merged the build process will generate all of this for you.

nullvariable avatar Dec 02 '19 21:12 nullvariable

Hey @nullvariable: I just now noticed this PR. Nice work! If it helps any, I have created an autocomplete terminus plugin. See https://github.com/terminus-plugin-project/terminus-autocomplete-plugin. It would be cool if we could collaborate and combine our ideas.

uberhacker avatar Jan 29 '20 23:01 uberhacker