Closed j-xella closed 4 months ago
I'm not too sure how I could save a command with how Rabbit is currently built. The current philosophy is that the contents of the Rabbit window should never be modified. This ensures several safeties, including no overflows, and thus no need to make a marquee effect.
I think command aliases may fit your need perfectly.
After further further thought, I'd have to add inputs anyway for Harpoon collections
Final decision. Just use aliases instead. Easily configurable in your ~/.bashrc
or ~/.zshrc
I respect your decision, but I wonder what makes it so difficult to save a terminal session in Rabbit lists?
As described in :help terminal
, terminal buffer looks like a special file name that can be opened with :edit
etc... So all that needs to be done is store that special name in the same lists...
For example, :term tig --all
will result in a terminal buffer named term://current_path//pid:tig --all
. OK, the pid part needs to be removed. But the rest term://current_path//tig --all
can be stored as a file name, and, when opened as file, it will run the same command in the same current dir.
Rabbit:History already allows you to jump between terminal sessions within neovim. I don't see the point in storing them persistently between neovim sessions. Tmux is already a very powerful tool to restore terminal sessions if you need it.
The limitation arises because Rabbit has no authority to restore terminal sessions. It only has access to the PID and buffer number. The terminal process is killed when you exit neovim.
If you use a command frequently, use an alias. If you can't remember, use a shell like zsh which allows you to type the beginning of the command, and pressing <Up>
will choose the most recent command with that prefix. There is nothing I can do to restore terminal sessions.
And fyi the "Final decision" was not meant to be rude.
My previous comments left some confusion about whether I would consider adding this feature.
It would be nice if, when working in terminal window, I could add it like a file to harpoon, with possibility to relaunch the same command in the same current folder later.