Skip to content

Instantly share code, notes, and snippets.

@felddy
Last active May 8, 2026 14:10
Show Gist options
  • Select an option

  • Save felddy/d1cc1102f856a446a12d1bf1afdabb9f to your computer and use it in GitHub Desktop.

Select an option

Save felddy/d1cc1102f856a446a12d1bf1afdabb9f to your computer and use it in GitHub Desktop.
Command to disable Starship in the active terminal. Add to bashrc.d

Shell Environment

Starship Prompt

This workspace uses Starship as the shell prompt, which can produce complex, multi-line output that interferes with terminal command parsing. Always run starship-off at the start of every new terminal session before executing any commands.

# Run this first in every new terminal session
starship-off

This reverts the prompt to a simple form and prevents Starship's decorations from being misread as command output.

if [ -z "${STARSHIP_OFF+x}" ]; then
eval "$(starship init bash)"
fi
starship-off() {
if [[ -n "${STARSHIP_PROMPT_COMMAND-}" ]]; then
PROMPT_COMMAND="$STARSHIP_PROMPT_COMMAND"
unset STARSHIP_PROMPT_COMMAND
else
unset PROMPT_COMMAND
fi
trap - DEBUG
PS0=""
PS1='\u@\h:\w\$ '
unset -f starship_preexec starship_precmd starship_preexec_all \
starship_preexec_ps0 _starship_set_return
unset STARSHIP_SHELL STARSHIP_SESSION_KEY STARSHIP_START_TIME \
STARSHIP_END_TIME STARSHIP_DURATION STARSHIP_CMD_STATUS \
STARSHIP_PIPE_STATUS STARSHIP_PREEXEC_READY
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment