Commit Graph

12 Commits

Author SHA1 Message Date
Eric Nielsen 2d1aea3b74 [prompt] Remove autoload -Uz colors
since we don't need that. We're using the newer '%F{red}color%f' code
instead.

Also use `PS1` instead of `PROMPT`, as suggested at `man zshcontrib`,
under "Writing Themes”.

Refactor code.
2018-02-07 18:15:17 -05:00
Eric Nielsen 8ba9621f48 [prompt] Add sp to the prompt_opts array
in our custom themes.

With zsh starting at version 5.4, when using the `prompt_opts` array,
`nopromptsp` will be set unless the array contains a `sp`. This was
introduced in zsh at
43e55a9bcd (diff-bb10d67e7a8561b66a53a805f3c77a40R233)

Fixes #209
2017-10-01 20:41:43 -05:00
Eric Nielsen 76cf486d5d Only evaluate prompt_gitster_status once
replacing its contents directly into the `PROMPT`, instead of calling
the function continuously.

Closes #150
2017-03-27 13:56:47 -07:00
Eric Nielsen 176d2ab4d3 Fix gitster theme errors when git-info not enabled
and add a comment stating that the theme requires the `git-info` module.

Closes #145, fixes #144
2017-03-08 06:20:02 -08:00
Eric Nielsen c1b02c06d0 Remove git_prompt_info and parse_git_dirty
as they were only being used by gitster prompt theme and kept for
Oh-My-Zsh compatibility. The newly introduced git-info module (inspired
by the git-info Prezto function) provides a more powerful
implementation than the Oh-My-Zsh inspired git_prompt_info.

Updated gitster to use the git-info module.

Closes #124
2017-01-19 05:10:19 -08:00
Cenk Gündoğan fcc4c573a8 [prompt] fix gitster path to reflect git repo
allow optional parameter for short_pwd

Closes #41
2016-04-02 13:33:01 -07:00
Matt Hamilton 9f838982fb [prompt] syntax refactor 2016-01-07 08:10:29 -05:00
caedus75 b46edd43a8 [prompt] add setup function to themes
proper setup and preview of themes with 'prompt' function

closes #12, closes #15
2016-01-07 08:07:11 -05:00
Matt Hamilton 5f68411637 [prompt] gitster: use short_pwd 2016-01-06 09:41:40 -05:00
caedus75 f2806b45bf fix prompt substitutions/expansions
The 'prompt' function disables any option set with 'setopt'.
To make options persistent we need to use the 'prompt_opts' array
instead

Closes #8
2015-12-30 04:42:31 -05:00
Matt Hamilton 1ee4d85547 fix gitster prompt 2015-12-27 21:13:08 -05:00
Matt Hamilton 02ec35a8d4 add gitster theme 2015-12-18 11:02:56 -05:00