Skip to content
This repository was archived by the owner on Nov 11, 2018. It is now read-only.

FR: Custom Command Completions #406

Open
jackiekaye89 opened this issue Mar 2, 2015 · 5 comments
Open

FR: Custom Command Completions #406

jackiekaye89 opened this issue Mar 2, 2015 · 5 comments

Comments

@jackiekaye89
Copy link

The FR in the title is to mean Feature Request XD

Anyways, ever since I discovered the location of the commands.ftcompletion file I've been toying with it and with an idea of what could be done that is similar... Custom Command Completions! Basically, allow the end user to create a file with the following syntax:

{  "text" : "CMDONE"; "COMMANDONE" },
{  "text" : "CMDTWO"; "COMMANDTWO" }

Or something similar at least...

where, basically, it allows you to define a series of custom shortcuts that will appear in the same way as the command history, but works as completions for longer commands, similar to the way some text editors work (refering to sublime text here, as it's pretty much the only editor I have experience with XD ). But if this is doable, it would be pretty awesome.

@nashley
Copy link
Contributor

nashley commented Mar 2, 2015

Can you give an example of this?
If I understand you correctly, zsh already does thus (albeit
non-graphically) with common programs, but FT only officially supports bash
at the moment.

On Mon, Mar 2, 2015, 15:30 Jackie [email protected] wrote:

The FR in the title is to mean Feature Request XD

Anyways, ever since I discovered the location of the commands.ftcompletion
file I've been toying with it and with an idea of what could be done that
is similar... Custom Command Completions! Basically, allow the end user to
create a file with the following syntax:

{ "text" : "CMDONE"; "COMMANDONE" },
{ "text" : "CMDTWO"; "COMMANDTWO" }

Or something similar at least...

where, basically, it allows you to define a series of custom shortcuts
that will appear in the same way as the command history, but works as
completions for longer commands, similar to the way some text editors work
(refering to sublime text here, as it's pretty much the only editor I have
experience with XD ). But if this is doable, it would be pretty awesome.


Reply to this email directly or view it on GitHub
#406.

@jackiekaye89
Copy link
Author

well, for example, say you type this into the terminal... sai ... there could be two options for that, a) a dropdown thing similar to the command history completion, or b) simply press tab... either method should expand that command to sudo apt-get install and allow you to continue typing the rest of the command.

@nashley
Copy link
Contributor

nashley commented Mar 2, 2015

Ok. Now I understand you better. That should be very possible.

On Mon, Mar 2, 2015 at 4:32 PM, Jackie [email protected] wrote:

well, for example, say you type this into the terminal... sai ... there
could be two options for that, a) a dropdown thing similar to the command
history completion, or b) simply press tab... either method should expand
that command to sudo apt-get install and allow you to continue typing the
rest of the command.


Reply to this email directly or view it on GitHub
#406 (comment).

@ZoomyCat
Copy link

So basically make Aliases tab complete :)

@jackiekaye89
Copy link
Author

pretty much, I guess

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants