Nukesor / pueue

:stars: Manage your shell commands.
MIT License
4.69k stars 128 forks source link

Is it possible to develop a mode, where whatever command I run, just like in a normal bash, is pushed into pueue automatically? #453

Closed elegracer closed 10 months ago

elegracer commented 11 months ago

A detailed description of the feature you would like to see added.

It's something like a virtual environment. I enter this mode, and looks like a normal bash shell, and I run any command normally. The command I enter, is automatically pushed into pueue, waiting to run.

In this mode, I don't need to copy-and-paste my normal command after pueue add, and I don't need to care about character escape, and shell completion is usable.

For example,

$ pueue parallel 1 # run tasks serially
$ pueue immerse-mode # enter into the imaginative immerse mode
(immerse-mode) $ fd -t d -d 1 -x DO_SOME_PRE_PROCESSING {} # this command is pushed into pueue
(immerse-mode) $ fd -t d -d 1 -x DO_SOME_POST_PROCESSING {} # this command is also pushed into pueue

Explain your usecase of the requested feature

Often I run commands that are long, complexed, and have many quotes (single and double ones). It's not easy to transform them into runnable commands to append to pueue add. I usually use fzf to find commands that I ran before. It's natural to directly select a historical command to run. Often it requries many commands to finish a goal. So after some trials to get the parameters right, I wish to just find them and push them into pueue, go get some coffee, and wait for the result, without having to prepend pueue add when I cannot use shell completion.

Alternatives

No response

Additional context

No response

Nukesor commented 11 months ago

I'm actually not in favor of this, since this would result in a lot of additional complexity.

We would have to build a custom shell, but would still need all of the goodies the user expects. I.e. shell completion, working aliases, prompts, colors. Also, each user has a different shell and other workflows, which won't be mirrored in said custom shell.

Nukesor commented 10 months ago

I think this should rather be incorprated in a separate project/tool, since this has little to do with pueue itself. It would be more of a wrapper around pueue.

I'm closing this for now, as this is out of scope :)