toolbox.sh: respect new TOOLBOX_DO_NOT_OVERRIDE_PS1
This allows users to set `TOOLBOX_DO_NOT_OVERRIDE_PS1` in their shell configuration to prevent toolbox from overriding PS1. Addresses #1357 Signed-off-by: Jens Petersen <petersen@redhat.com>
This commit is contained in:
		
							parent
							
								
									55582290eb
								
							
						
					
					
						commit
						59640cecd9
					
				|  | @ -48,8 +48,10 @@ fi | |||
| 
 | ||||
| if [ -f /run/.containerenv ] \ | ||||
|    && [ -f /run/.toolboxenv ]; then | ||||
|     [ "${BASH_VERSION:-}" != "" ] && PS1=$(printf "\[\033[35m\]⬢ \[\033[0m\]%s" "[\u@\h \W]\\$ ") | ||||
|     [ "${ZSH_VERSION:-}" != "" ] && PS1=$(printf "\033[35m⬢ \033[0m%s" "[%n@%m]%~%# ") | ||||
|     if [ "${TOOLBOX_DO_NOT_OVERRIDE_PS1}" = "" ]; then  | ||||
|         [ "${BASH_VERSION:-}" != "" ] && PS1=$(printf "\[\033[35m\]⬢ \[\033[0m\]%s" "[\u@\h \W]\\$ ") | ||||
|         [ "${ZSH_VERSION:-}" != "" ] && PS1=$(printf "\033[35m⬢ \033[0m%s" "[%n@%m]%~%# ") | ||||
|     fi | ||||
| 
 | ||||
|     if ! [ -f "$toolbox_welcome_stub" ]; then | ||||
|         echo "" | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue