summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2017-02-11 18:22:49 +0300
committerGitHub <noreply@github.com>2017-02-11 18:22:49 +0300
commit1de14df11fb3bf67958555b921f8323cda0d3d03 (patch)
tree44a9cb7f138ce42e7a721be741c798c404abae04 /powerlevel9k.zsh-theme
parentc6f8e1023328424f67fe4cb559f799b6eff0e9a2 (diff)
parent052eba9c74b2153dbd70eb4ba829f258a596baf2 (diff)
Merge pull request #395 from dritter/benoits_dir_writable_segment
Benoits dir writable segment
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme8
1 files changed, 7 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index c7220b3d..7499197b 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_writable: Display information about the user's permission to write in the current directory
+prompt_dir_writable() {
+ 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 "$@"
-