bulker icon indicating copy to clipboard operation
bulker copied to clipboard

bulker overwrites PS1

Open stolarczyk opened this issue 5 years ago • 6 comments

if I activate a crate, bulker creates a new prompt, which is awesome. But It also overwrites my previously set prompt configuration in PS1. Is it possible to prepend or append bulker prompt to whatever I have already set?

[mstolarczyk@MichalsMBP peppro](master): bulker-activate databio/peppro
Bulker config: /Users/mstolarczyk/bulker_config.yaml
Activating bulker crate: databio/peppro
databio/peppro|~/Uczelnia/UVA/code/peppro$

stolarczyk avatar Mar 31 '20 19:03 stolarczyk

Yes, it's possible to customize a shell prompt in the shell_prompt config option in your bulker config file.

However, this is broken at the moment, due to something broken about Yacman. See #46

nsheff avatar Mar 31 '20 19:03 nsheff

can you solve https://github.com/databio/yacman/issues/32 ?

nsheff avatar Mar 31 '20 19:03 nsheff

ok, will look into this

stolarczyk avatar Mar 31 '20 19:03 stolarczyk

Ok, after a long time I think the answer to this is to put your custom prompt in shell_prompt and just don't use quotes around it, or use singled quotes (better). And, use \b to refer to the bulker crate. So, for example add this to your bulker config:

  shell_prompt: '[\u@\h(\b) \W] $ '

nsheff avatar Mar 25 '21 13:03 nsheff

@stolarczyk can you see if this now solves your use case?

https://bulker.databio.org/en/dev/custom_prompts/

nsheff avatar Mar 25 '21 14:03 nsheff

you can also now use -p to not update prompts if you want to just keep using your default prompt.

nsheff avatar Mar 25 '21 15:03 nsheff