p-e-w / finalterm

At last – a modern terminal emulator (NO LONGER MAINTAINED)
http://finalterm.org
GNU General Public License v3.0
3.84k stars 179 forks source link

FR: Custom Command Completions #406

Open jackiekaye89 opened 9 years ago

jackiekaye89 commented 9 years ago

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 commented 9 years ago

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 notifications@github.com 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.

jackiekaye89 commented 9 years ago

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 commented 9 years ago

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

On Mon, Mar 2, 2015 at 4:32 PM, Jackie notifications@github.com 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.

ZoomyCat commented 9 years ago

So basically make Aliases tab complete :)

jackiekaye89 commented 9 years ago

pretty much, I guess