knqyf263/pet

transfer command to prompt instead interactive box

sgohl opened this issue · 1 comments

sgohl commented

Hi, first time user here.

What I would like to have, is pet exec to just transfer the selected snippet to my prompt, instead of printing the input boxes which have no bash-completion available. This, while being fancy, makes it almost useless, unfortunately.
Sometimes, the parameters are very flexible and static placeholders are not viable. If it just would print the snippet to the prompt, you could just proceed typing as your're used to. Without knowing anything, I would have intuitively expected TAB should do this.

What I notice next, is that I can not use arrow-up key to yield the last command into my bash prompt, instead it shows pet exec, since that is understandably the last command, but I think pet should replace that with the command that you actually just executed via pet exec

Hey @sgohl! Very valid concerns.

  1. I'm not sure there's a way of doing that with pure bash, but maybe possible with gocui or others. Will have to look into it. It also might be possible to add bash completion somehow to the gocui inputs. I'll open a project ticket to explore this as a feature request. I still find this incredibly useful even in it's current state though, as do a lot of other Pet users. Maybe you have a very niche usecase that requires autocompletion!

  2. Pet exec appearing as the last command is indeed annoying. I'll also add this as a bug see if we can find a way around it.