mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
board/common: let Bash update its PS1 hostname for each new line
Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
05d49f6cfc
commit
2272b56618
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user