Commit 0b09145b by Fred Smith

include AWS instanceID in prompt

parent 2b732151
...@@ -53,10 +53,12 @@ if [ -n "$force_color_prompt" ]; then ...@@ -53,10 +53,12 @@ if [ -n "$force_color_prompt" ]; then
fi fi
fi fi
command -v ec2metadata >/dev/null 2>&1 && { INSTANCEID=$(ec2metadata --instance-id); }
if [ "$color_prompt" = yes ]; then if [ "$color_prompt" = yes ]; then
PS1='{{ USER_CMD_PROMPT }}${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' PS1='{{ USER_CMD_PROMPT }}${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h $INSTANCEID\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
else else
PS1='{{ USER_CMD_PROMPT}}${debian_chroot:+($debian_chroot)}\u@\h:\w\$ ' PS1='{{ USER_CMD_PROMPT}}${debian_chroot:+($debian_chroot)}\u@\h $INSTANCEID:\w\$ '
fi fi
unset color_prompt force_color_prompt unset color_prompt force_color_prompt
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment