Open ethanpailes opened 1 week ago
Closely related to this issue is the ability to disable automatic prompt setting in the config. I would like to be able to disable it and add $SHPOOL_SESSION_NAME
to the prompt on my own.
You can do that by setting prompt_prefix = ""
in the config. We should probably do a better job of documenting that.
Brilliant. Thanks!
Except that didn't work. Am I supposed to put it in some section?
You probably need to restart your daemon (this will get fixed once we deal with https://github.com/shell-pool/shpool/issues/29).
systemctl --user restart shpool
is the way to do it (or you could just stop the service and let socket activation take care of starting it back up again).
Yup, that did it. Many thanks. It's a fantastic tool you've written. More feature requests are on the way. ;-)
I just made https://github.com/shell-pool/shpool/pull/39 in order to try to document the config options better
Currently if you make some tweak to your shell's .rc files in which you have a custom prompt configured, then reload the changes by doing
source ~/.bashrc
or. ~/.bashrc
, shpool's prompt prefix that it injects on startup will get clobbered. This is a bit sad.I can think of a few approaches to this, none of which are entirely seemless:
shpool prompt-hook <bash|zsh|fish>
subcommand that is meant to be invoked with$(shpool prompt-hook bash)
, which you can add at the end of your.bashrc
. In addition to doing the usual thing to inject a prompt, it sets a SHPOOL_PROMPT_ALREADY_SET_UP=true env var, which the normal prompt hooks setup code checks for in order to avoid double-adding the prompt on first startup.The trouble with both of these approaches is that they are too manual. Shpool is meant to be an easy option that works well out of the box without configuration. We could have skipped all the prompt hook stuff if we were willing to demand that users edit their .rc files in order to use shpool, since they can just incorperate it into their normal prompt config, but shpool is meant to be easy to use even for people who are not comfortable with stuff like that.