diff --git a/board/common/rootfs/etc/bash.bashrc b/board/common/rootfs/etc/bash.bashrc index f5f7f66a..e934fc5c 100644 --- a/board/common/rootfs/etc/bash.bashrc +++ b/board/common/rootfs/etc/bash.bashrc @@ -3,6 +3,13 @@ # If not running interactively, don't do anything [ -z "$PS1" ] && return +# Reevaluate for each line, in case hostname changes +function prompt_command +{ + PS1="\u@$(hostname):\w\$ " +} +export PROMPT_COMMAND=prompt_command + # check the window size after each command and, if necessary, # update the values of LINES and COLUMNS. shopt -s checkwinsize