diff --git a/themes/powerline/README.md b/themes/powerline/README.md index 512461fb..d0a46815 100644 --- a/themes/powerline/README.md +++ b/themes/powerline/README.md @@ -4,8 +4,7 @@ A colorful theme, where shows a lot information about your shell session. **IMPORTANT:** This theme requires that [a font with the Powerline symbols](https://github.com/powerline/fonts) needs to be used in your terminal emulator, otherwise the prompt won't be displayed correctly, i.e. some of the additional icons and characters will be missing. Please follow your operating system's instructions to install one of the fonts from the above link and select it in your terminal emulator. -**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If it's not the case (i.e you are running on -a corporate network) you can set the flag 'THEME_CHECK_SUDO=false' in your ~/.bashrc or ~/.bash_profile +**NOTICE:** The default behavior of this theme assumes that you have sudo privileges on your workstation. If that is not the case (e.g. if you are running on a corporate network where `sudo` usage is tracked), you can set the flag 'export THEME_CHECK_SUDO=false' in your `~/.bashrc` or `~/.bash_profile` to disable the Powerline theme's `sudo` check. This will apply to all `powerline*` themes. ## Provided Information diff --git a/themes/powerline/powerline.base.bash b/themes/powerline/powerline.base.bash index ff039c7a..dff870cb 100644 --- a/themes/powerline/powerline.base.bash +++ b/themes/powerline/powerline.base.bash @@ -1,3 +1,6 @@ +# Define this here so it can be used by all of the Powerline themes +THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true} + function set_color { if [[ "${1}" != "-" ]]; then fg="38;5;${1}" diff --git a/themes/powerline/powerline.theme.bash b/themes/powerline/powerline.theme.bash index d2338fc7..12de9cbe 100644 --- a/themes/powerline/powerline.theme.bash +++ b/themes/powerline/powerline.theme.bash @@ -2,8 +2,6 @@ . "$BASH_IT/themes/powerline/powerline.base.bash" -THEME_CHECK_SUDO=${THEME_CHECK_SUDO:=true} - PROMPT_CHAR=${POWERLINE_PROMPT_CHAR:=""} POWERLINE_LEFT_SEPARATOR=${POWERLINE_LEFT_SEPARATOR:=""}