finalterm icon indicating copy to clipboard operation
finalterm copied to clipboard

FR: Custom Command Completions

Open jackiekaye89 opened this issue 10 years ago • 5 comments

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.

jackiekaye89 avatar Mar 02 '15 20:03 jackiekaye89

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 https://github.com/p-e-w/finalterm/issues/406.

nashley avatar Mar 02 '15 20:03 nashley

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.

jackiekaye89 avatar Mar 02 '15 21:03 jackiekaye89

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 https://github.com/p-e-w/finalterm/issues/406#issuecomment-76829844.

nashley avatar Mar 02 '15 23:03 nashley

So basically make Aliases tab complete :)

ZoomyCat avatar Mar 16 '15 14:03 ZoomyCat

pretty much, I guess

jackiekaye89 avatar Mar 16 '15 14:03 jackiekaye89