minor tweaks
This commit is contained in:
3
pure.zsh
3
pure.zsh
@@ -48,7 +48,6 @@ prompt_pure_precmd() {
|
||||
# git info
|
||||
vcs_info
|
||||
|
||||
# add `%*` to display the time
|
||||
print -P '\n%F{blue}%~%F{8}$vcs_info_msg_0_`prompt_pure_git_dirty` $prompt_pure_username%f %F{yellow}`prompt_pure_cmd_exec_time`%f'
|
||||
|
||||
# reset value since `preexec` isn't always triggered
|
||||
@@ -70,7 +69,7 @@ prompt_pure_setup() {
|
||||
zstyle ':vcs_info:git*' actionformats ' %b|%a'
|
||||
|
||||
# show username@host if logged in through SSH
|
||||
[[ -n "$SSH_CONNECTION" ]] && prompt_pure_username='%n@%m '
|
||||
[[ "$SSH_CONNECTION" != '' ]] && prompt_pure_username='%n@%m '
|
||||
|
||||
# prompt turns red if the previous command didn't exit with 0
|
||||
PROMPT='%(?.%F{magenta}.%F{red})❯%f '
|
||||
|
||||
@@ -24,12 +24,12 @@ Most prompts are cluttered, ugly and slow. I wanted something visually pleasing
|
||||
|
||||
- Clone this repo, add it as a submodule, or just download `pure.zsh`.
|
||||
|
||||
- Symlink `pure.zsh` to somewhere in `$fpath` with the name `prompt_pure_setup`.
|
||||
- Symlink `pure.zsh` to somewhere in [`$fpath`](http://www.refining-linux.org/archives/46/ZSH-Gem-12-Autoloading-functions/) with the name `prompt_pure_setup`.
|
||||
|
||||
Example:
|
||||
|
||||
```sh
|
||||
$ ln -s ./pure.zsh /usr/local/share/zsh/site-functions/prompt_pure_setup
|
||||
$ ln -s "$PWD/pure.zsh" /usr/local/share/zsh/site-functions/prompt_pure_setup
|
||||
```
|
||||
*Run `echo $fpath` to see possible locations.*
|
||||
|
||||
|
||||
Reference in New Issue
Block a user