You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Option to disable modification of the user's prompt. (#1743)
## Summary
Devbox prefixes the user's prompt (PS1) with `(devbox)` when inside the
`devbox shell`. Unfortunately, this doesn't look great with prompts
which have been customized (with starship for example).
Disable prompt modification by setting either `DEVBOX_NO_PROMPT` or
`devbox_no_prompt` (fish) in your shell. Now the user can detect devbox
and display it on their PS1 using the method if their choosing.
Fixes#845.
## How was it tested?
### bash and zsh
I ran the command in these shells with `export DEVBOX_NO_PROMPT=true`
and without the variable (`unset DEVBOX_NO_PROMPT`) and observed the
results.
```
if [ -z "$DEVBOX_NO_PROMPT" ]; then
export PS1="(devbox) $PS1"
fi
```
### fish
Disclaimer, I'm not a fish user. I installed fish and read the
documentation.
I added `set devbox_no_prompt true` to my `.config/fish/config.fish`,
then removed it and observed the results.
```
if not set -q devbox_no_prompt
functions -c fish_prompt __devbox_fish_prompt_orig
function fish_prompt
echo "(devbox)" (__devbox_fish_prompt_orig)
end
end
```
0 commit comments