Properly handle various SHELLs
Closed this issue · 4 comments
spolu commented
- properly prepend
[warp:<id>]
to PROMPT/PS1 - properly load the correct rc/profile file at warp opening
Goal: bash, zsh on Linux and OSX
(check how tmux does it)
spolu commented
tmux retrieves the shell using the following fallbacks:
- env $SHELL
- passwd file
- platform defaults
tmux also run bash with -l
which seems to standardize the behavior of the shell (which should solve the second bullet point)
spolu commented
bash -l -c "echo \$PS1"
spolu commented
Most consistent solution seems to start a bash -l
or zsh
and write echo $PS1; exit
or echo $PROMPT; exit
to it and parse the output
spolu commented
Didn't find a proper solution so sticking with not altering PS1/PROMPT and using the env variable with -l
(for bash-like)