Added ability to hide username or hostname

This commit is contained in:
wujtruj
2013-03-13 20:08:29 +01:00
parent d55b7f070c
commit 57d37e0701
2 changed files with 11 additions and 1 deletions

View File

@@ -58,6 +58,12 @@ If you don't want to display your username (the green or red (root) colors are s
POWERLINE_HIDE_USER_NAME="true" POWERLINE_HIDE_USER_NAME="true"
``` ```
If you don't want to display your hostname (the green or red (root) colors are still there):
```
POWERLINE_HIDE_HOST_NAME="true"
```
If you don't want the blank line before the prompt: If you don't want the blank line before the prompt:
``` ```

View File

@@ -14,7 +14,11 @@ else
POWERLINE_RIGHT_A="" POWERLINE_RIGHT_A=""
fi fi
if [ "$POWERLINE_HIDE_USER_NAME" = "" ]; then if [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
POWERLINE_USER_NAME="%n@%M"
elif [ "$POWERLINE_HIDE_USER_NAME" != "" ] && [ "$POWERLINE_HIDE_HOST_NAME" = "" ]; then
POWERLINE_USER_NAME="@%M"
elif [ "$POWERLINE_HIDE_USER_NAME" = "" ] && [ "$POWERLINE_HIDE_HOST_NAME" != "" ]; then
POWERLINE_USER_NAME="%n" POWERLINE_USER_NAME="%n"
else else
POWERLINE_USER_NAME="" POWERLINE_USER_NAME=""