1
0
mirror of https://github.com/dcarrillo/prezto.git synced 2025-07-01 09:19:25 +00:00
Commit Graph

42 Commits

Author SHA1 Message Date
a60499f933 [general] Miscellaneous cleanup and formatting 2017-08-04 13:45:56 -05:00
9bdc1b35d5 Migrate sorin prompt to zsh-async (#1385)
This includes some improvements by @indrajitr in addition to the main migration.

The first step was to avoid PROMPT and RPROMPT modification when possible (which may help resolve some other issues as well relating to zsh crashes with the sorin prompt) then update the displayed git information in a separate variable rather than a command.

We use zsh-async for creating and running background tasks. The sorin prompt uses it to update git info without blocking the prompt from displaying (because of how long it can take). In the future it may be worth moving more tasks and more prompts to using this.

The move to zsh-async does make the git prompt slower in some circumstances (most noticeable in large repos), but this is a worthwhile tradeoff to avoid the cache file which had a number of potential security holes.

We have also switched to adding zsh-async as an external submodule (rather than the version bundled with pure) which may cause some migration headaches, but it will be worth it in the long run.
2017-07-24 11:55:02 -07:00
17a59bada7 [prompt] Rename helper function promptpwd to prompt-pwd for consistency
Changes:
* In prezto, function names are hyphenated ('-') by convention,
  rename `promptpwd` to `prompt-pwd` accordingly.
* Unset local variable `current_pwd` proactively.
* Tweak additional documentation for `prompt-pwd`.
2017-07-22 13:13:00 -05:00
5cd3380d9d [prompt/sorin] Fix branch code exploit vulnerability
Escape all $ except the first $. Escape all backtick `'s. This prevents
variable names or shell expansions placed as branch names from
remotely exploiting code.

Fixes issue #1267 for sorin prompt.
2017-07-05 13:06:36 -07:00
a0541ce7a5 Default sorin theme to /tmp when TMPDIR is not set
Fixes #1331
2017-06-16 10:37:54 -07:00
2f20a80f72 sorin theme: Use a proper temp file for async data 2017-06-13 10:36:35 -07:00
60c433d4ce Move common promptpwd code to external function 2017-04-13 01:15:01 -07:00
f2a826e963 Add preview function to sorin theme 2015-05-31 16:51:29 -04:00
bdec6c4e20 Redraw only when called from subprocess 2015-05-31 16:50:03 -04:00
ef634f38a4 Replace signal TERM with KILL 2015-05-31 16:47:16 -04:00
b761261b11 Replace signal USR1 with WINCH 2015-05-31 16:46:42 -04:00
fe64f91f52 Update sorin screenshot 2015-05-19 18:25:40 -04:00
b46769149b Remove Emacs indicator
The user always knows that he is inside Emacs making the indicator
unnecessary.
2015-05-19 18:25:40 -04:00
999f0d1a74 Use numerical colors 2015-05-19 18:25:40 -04:00
f6a2c73423 Remove 'git:' prefix 2015-05-19 18:25:40 -04:00
a1dea6ae43 Get Git status asynchronously 2015-05-19 18:25:39 -04:00
087fce8548 Update sorin theme screenshot 2014-11-11 20:51:45 -05:00
2ae905a625 Indicate inside Emacs 2014-11-11 20:51:45 -05:00
19fc31c342 Indicate SSH connections 2014-11-11 20:51:45 -05:00
a84ac5b002 Only one newline at end of file 2014-10-09 23:38:15 -04:00
b4884d4d45 [Fix #626] Escape '%' in path 2014-10-06 16:54:21 -04:00
e836957e4f [Fix #221] Add a simple git-info 2013-05-18 15:31:32 -04:00
b531191e2c [Fix #366] Distinct position with red 2013-01-14 15:52:32 -05:00
4c116cb4d2 Rename git-info zstyle patterns 2012-10-02 12:47:37 -04:00
141a1ba947 Rename editor-info zstyle patterns 2012-10-02 12:47:20 -04:00
eb93677e4a [Fix #303] Remove extra '/' in sorin theme 2012-09-28 18:24:34 -04:00
be0e4245a6 [Fix #301] Unset $MATCH after use 2012-09-26 16:51:32 -04:00
bc8533c30e Update sorin theme screenshot 2012-09-25 17:25:29 -04:00
52a8c98337 [Fix #290] Add fish shell style PWD to sorin theme 2012-09-25 00:54:49 -04:00
ab0eedd45e Update sorin theme screenshot 2012-09-09 20:06:12 -04:00
80909fd04a Change Git branch and prompt color 2012-09-09 19:11:17 -04:00
fea343c03a Move the vi mode indicator to the left prompt 2012-09-09 14:00:43 -04:00
e5e26eccff [#245] Convert helper into a module 2012-09-08 19:23:33 -04:00
fb9a20591f [Fix #197] Rebrand as Prezto
Conflicts:
	README.md
	runcoms/zshenv
2012-09-03 16:51:27 -04:00
a9b6c84ea5 Update comments in themes 2012-08-06 16:52:38 -04:00
f48a60f40e [Fix #127] Indicate overwrite mode in sorin theme 2012-04-11 17:57:17 -04:00
000b3653e6 [Fix #126] Do not evaluate undefined $git_info
Fix a bug introduced in aa0c1fa.
2012-04-11 12:29:45 -04:00
64da1ed627 Rename $editor_keymap_info to $editor_info[keymap] 2012-04-10 10:27:56 -04:00
aa0c1faa19 [Fix #88] Allow arbitrary git-info formats
The terms 'prompt' and 'rprompt' are not always appropriate.
A multi-line theme may choose 'line-one' and 'line-two' instead.

@ColinHebert contributed to this commit.
2012-04-09 17:45:31 -04:00
48dcd2f723 Shorten git zstyle namespace 2012-04-08 15:07:14 -04:00
d5a94dda74 [#23] Rename keymap indicator zstyles 2012-04-08 15:07:13 -04:00
66c14486c6 [#23, Fix #80] Move themes into the prompt module 2012-04-08 15:07:13 -04:00