Browse Source

zsh: tweak prompts & some comments; add menu select to completion

Brennen Bearnes 6 months ago
parent
commit
ef90a1668a
1 changed files with 7 additions and 2 deletions
  1. 7
    2
      home/.zshrc

+ 7
- 2
home/.zshrc View File

@@ -11,7 +11,12 @@ export HISTFILE=~/.histfile
11 11
 export HISTSIZE=15000
12 12
 export SAVEHIST=9999999
13 13
 
14
+# vi-style cycling through completions on repeated tab presses:
14 15
 setopt menu_complete
16
+
17
+# Allow arrow-key selection of completion items from a menu:
18
+zstyle ':completion:*' menu select
19
+
15 20
 setopt prompt_subst
16 21
 setopt inc_append_history
17 22
 setopt hist_ignore_space
@@ -118,11 +123,11 @@ esac
118 123
 # Reset the prompt on every command to get that parse_git_branch
119 124
 # function to run.  Might be a better way to do this, but whatever:
120 125
 function precmd {
121
-  export PS1="$PR_HOST_COLOR%n@%m $PR_TIME_COLOR%* $PR_PATH_COLOR%d $(parse_git_branch)$PR_NO_COLOR$PR_SIGIL "
126
+  export PS1="$PR_HOST_COLOR%n@%m $PR_TIME_COLOR%* $PR_PATH_COLOR%~ $(parse_git_branch)$PR_NO_COLOR $PR_SIGIL "
122 127
 }
123 128
 
124 129
 # Set up the prompt:
125
-export PS1="$PR_HOST_COLOR%n@%m $PR_TIME_COLOR%* $PR_PATH_COLOR%d $(parse_git_branch)$PR_NO_COLOR$PR_SIGIL "
130
+export PS1="$PR_HOST_COLOR%n@%m $PR_TIME_COLOR%* $PR_PATH_COLOR%~ $(parse_git_branch)$PR_NO_COLOR $PR_SIGIL "
126 131
 
127 132
 # }}}
128 133
 

Loading…
Cancel
Save