diff options
author | Benoit Averty <benoit.averty@gmail.com> | 2016-08-09 12:22:02 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2017-02-01 01:54:03 +0300 |
commit | 6927b0ca94157e2fb9dcd3b12766b4e913d0e44e (patch) | |
tree | 9a48d0a25f81d971f6d999aa8e305cb3ec82f1c6 /powerlevel9k.zsh-theme | |
parent | a58e8bdc8cf4c51c80dc9e63eef52e95214c54f2 (diff) |
Add directory permission prompt segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index f104b789..620a5f7d 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1114,6 +1114,13 @@ prompt_swift_version() { "$1_prompt_segment" "$0" "$2" "magenta" "white" "${swift_version}" 'SWIFT_ICON' } +# dir_permision: Display information about the user's permission to write in the current directory +prompt_dir_permission() { + if [[ ! -w "$PWD" ]]; then + "$1_prompt_segment" "$0_FORBIDDEN" "$2" "red" "226" "" 'LOCK_ICON' + fi +} + ################################################################ # Prompt processing and drawing ################################################################ @@ -1240,4 +1247,3 @@ prompt_powerlevel9k_setup() { } prompt_powerlevel9k_setup "$@" - |