On 02/09/2017 10:43 AM, Clint Byrum wrote:
> Excerpts from Mark Voelker's message of 2017-02-09 15:41:33 +0000:
>> I work with lots of different clouds and any time I switch focus to a 
>> terminal I have to figure out which cloud it’s environment is set up to use. 
>>  My terminal emulator has the same color scheme as my IRC client, so I’ve 
>> probably typed “set | grep OS_” into IRC accidentally about a million times 
>> over the years. 
>>
> 
> Quick tip:
> 
> #1 - Move all those bespoke rc's into a single clouds.yaml:
> http://docs.openstack.org/developer/python-openstackclient/configuration.html

++

> #2 - Abolish OS_* except OS_CLOUD from your environment variables

++

> #3 - Add $OS_CLOUD to your $PS1 -- You will now always know what cloud
> you're pointed at.

if [ "$color_prompt" = yes ]; then

PS1='${debian_chroot:+($debian_chroot)}${OS_CLOUD:+${OS_CLOUD}:}${OS_REGION_NAME:+${OS_REGION_NAME}:}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$
'
else

PS1='${debian_chroot:+($debian_chroot)}${OS_CLOUD:+${OS_CLOUD}:}${OS_REGION_NAME:+${OS_REGION_NAME}:}\u@\h:\w\$
'
fi

Is in my prompt for that very reason, FWIW

__________________________________________________________________________
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev

Reply via email to