1
0
Fork 0
mirror of synced 2024-12-21 21:51:07 -05:00
Commit graph

436 commits

Author SHA1 Message Date
Matt Hamilton
d40b6cf928 [prompt] pass prompt prams from zprompt_theme
While normally it's a good thing that zsh doesn't auto-expand on spaces,
in this case we want to split on spaces into distinct words, that way
the values are passed to `prompt` in multiple params.

Fixes #178
2017-09-18 09:18:20 -04:00
Matt Hamilton
54faa20468 [pacman] detect pkg regardless of compress method 2017-09-18 09:18:12 -04:00
Eric Nielsen
2a9a003271 [template] don't compile highlighters test-data
for syntax-highlighting submodule. See discussion on
https://github.com/zsh-users/zsh-syntax-highlighting/pull/443

Fixes #205
2017-09-11 14:27:12 -05:00
Eric Nielsen
29e2043b99 [syntax-highlighting] Update submodule to version 0.6.0 2017-09-11 09:48:55 -05:00
Eric Nielsen
7479e22b17 [prompt] lean: Update submodule 2017-09-11 09:44:49 -05:00
Eric Nielsen
dc73306b4d [completion] Update submodule 2017-09-11 09:41:56 -05:00
Chet Gurevitch
9eaba9a3a3 [meta] Use ZIM_HOME in zmanage
And fix init.zhs to export ZIM_HOME. The zmanage script invokes a new
shell for the sub commands, and those would fail as there would be no
value for ZIM_HOME.

Closes #203
2017-09-04 17:29:34 -05:00
Thiago Kenji Okada
f6bb75579f Allow arbitrary ZIM location with ZIM_HOME
This change allow arbitrary Zim location path by setting a new
environment variable, ZIM_HOME. If the user does not set it, Zim falls
back to the old "${ZDOTDIR:-${HOME}}/.zim" location.

Closes #203
2017-09-04 17:25:01 -05:00
Eric Nielsen
96c474978e [completion] Update submodule 2017-08-19 14:03:28 -05:00
Eric Nielsen
25d97ccac9 [prompt] lean: Update submodule 2017-08-19 14:00:48 -05:00
Eric Nielsen
537f076603 Don't load zim if zsh < 5.2
and show an error message, as discussed in #184.

Code in modules/environment/init.zsh is also simplified to only support
zsh >= 5.2

Closes #200
2017-08-03 09:18:39 -05:00
wweir
83f61ddeba [environment] Recognize comments starting with '#'
compatible with bash/omz

Closes #198
2017-07-30 17:37:12 -05:00
Eric Nielsen
a9618a0fd3 [git] Use fetch --all in gfu alias
instead of `remote update`. Both behave the same way, fetching from all
configured remotes. The `fetch --all` is shorter, and probably more
familiar. See https://stackoverflow.com/a/17512004/2654518

Also change `;` to `&&`, so merge is only called after fetch succeeded.

Closes #196
2017-07-30 17:35:44 -05:00
Eric Nielsen
8669a4f369 [git] Commit messages with 50 characters in glG
truncating at character 60. First 10 chars are used for `*`, commit
hash and spaces.

The 50 char limit is based on
http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html

Also changed aliases to use the `--long-option` format when available,
so aliases are clearer for those unfamiliar with the options.

Closes #196
2017-07-30 17:35:44 -05:00
Eric Nielsen
460090beb9 [completion] Update submodule 2017-07-25 10:07:03 -05:00
Eric Nielsen
d562acc4c0 [history-substring-search] Remove redundant defaults
for options already defined, with the same values, in
`zsh-history-substring-search.zsh`. See
be0fe1fca9/zsh-history-substring-search.zsh (L46-L48)

Closes #189
2017-07-17 16:15:51 -03:00
Eric Nielsen
ff32968ba9 Warning message for zsh < 5.2
as discussed in #184. We'll first give users this warning message. A
future update will replace this by an error.

Also, starting at that update, a new branch will be created for users
that still want to stick with zsh < 5.2.

Closes #194
2017-06-28 21:52:20 -05:00
Eric Nielsen
61019c5827 [prompt] pure: Update submodule 2017-06-28 14:25:15 -05:00
Eric Nielsen
c7fdef5305 [prompt] lean: Update submodule 2017-06-28 14:24:37 -05:00
Eric Nielsen
95f1e3c6ca [prompt] pure: Update submodule 2017-06-08 09:58:41 -05:00
Eric Nielsen
0fec8a7e40 [prompt] lean: Update submodule 2017-06-08 09:58:17 -05:00
Eric Nielsen
57ebe3e61f [history-substring-search] Update submodule 2017-06-08 09:57:44 -05:00
Eric Nielsen
e3637db2c4 [completion] Update submodule 2017-06-08 09:57:22 -05:00
Eric Nielsen
f4fa8cf8b0 [autosuggestions] Update submodule 2017-06-08 09:56:48 -05:00
ℳichiel ℛoos
87a8b82563 [autosuggestions] Add module
Closes #172. Fixes #35.
2017-06-08 09:33:26 -05:00
Matt Hamilton
126e950056 remove broken quote in fasd function 2017-05-30 06:30:30 -07:00
Matt Hamilton
8f395be650 Fix fasd regression from #180
Fixes #186
2017-05-29 09:54:23 -07:00
ℳichiel ℛoos
fcf060482b [environment] Use zsh style tests for empty vars
Closes #180
2017-05-17 15:59:49 -05:00
ℳichiel ℛoos
c58f9015ec [fasd] Use zsh style tests for empty vars
Closes #180
2017-05-17 15:59:38 -05:00
Eric Nielsen
872926c84c [utility] Use one-liner instead of "if then fi"
in recent tests included, to keep code simpler.
2017-05-15 08:59:17 -05:00
ℳichiel ℛoos
f15d6e4e02 [utility] Don't overwrite existing env variables
Environment variables set in `.zshenv` should not be overwritten.
However, it is sourced before Zim loads, making Zim overwrite the
settings.

Fixes #175. Closes #179
2017-05-15 08:49:06 -05:00
Matt Hamilton
4ad8f8db8e [syntax-highlighting] update submodule 2017-04-30 09:03:36 -07:00
Matt Hamilton
7d389add76 [prompt] pure: update submodule 2017-04-30 09:03:25 -07:00
Matt Hamilton
0e2094afef [prompt] liquidprompt: update submodule 2017-04-30 09:03:12 -07:00
Matt Hamilton
60968c428d [prompt] lean: update submodule 2017-04-30 09:02:58 -07:00
Matt Hamilton
903e8aa24d [completion] update submodule 2017-04-30 09:02:46 -07:00
Eric Nielsen
c8820313ef Fix liquidprompt preview
breaking the current prompt after `prompt -p`. Actually liquidprompt is
pretty invasive in the way it is implemented, defining extra
`prompt_on`, `prompt_off` and `prompt_OFF` functions to switch it after
it is executed.

Fixes #112, Closes #165
2017-04-30 09:01:36 -07:00
Henrique Silva
d97ff6bd07 Support dynamic title on urxvt
Closes #151
2017-04-30 09:01:14 -07:00
Eric Nielsen
dca1803ced [prompt] Don't expand git_info in eriner theme
to avoid the git-info vulnerability to execute an arbitrary command, as
reported in #158.

Fixes #158 (for eriner theme), Closes #168
2017-04-17 23:17:53 -05:00
Eric Nielsen
d771fd88fb [prompt] Range segment in eriner as in magicmace
This reverts commit eee6e911d2.

As suggested in
https://github.com/Eriner/zim/pull/142#issuecomment-283806756 (and
"thumb-upped" by Tmplt). The Ranger segment was introduced in eriner
theme by Tmplt in https://github.com/Eriner/zim/pull/64. He also added
it to the magicmace theme.
2017-04-17 16:31:07 -05:00
Eric Nielsen
3c2730d0c4 [git-info] Remove dependency on git-dir function
from the git module.
Also now making all git calls with `command`.

Fixes #161 (again), Closes #164
2017-04-12 20:21:26 -05:00
Eric Nielsen
9de30b97b1 Remove is-true function
that was only being used in the `git` and `git-info` modules to check
the output of `git rev-parse --is-inside-work-tree`. The code depending
on this function was already changed.

Closes #163
2017-04-11 17:50:09 -07:00
Eric Nielsen
b34a75e4d8 Remove git dependency on is-true function
The function is currently only being used for checking the result of
`git rev-parse --is-inside-work-tree`. Checking for the return code of
the command is enough.
2017-04-11 17:50:07 -07:00
Eric Nielsen
262f4992e9 Remove git-info dependency on is-true function
from `git` module. Actually, the function is a little bit of
over-engineering and it's currently only being used for checking the
result of `git rev-parse --is-inside-work-tree`, even in the `git`
module code.

Checking for the return code of `git rev-parse --is-inside-work-tree` is
enough. Also refactored other portions of the code where return codes
are being checked.

Fixes #161, Closes #162
2017-04-11 17:49:47 -07:00
Joe Moon
43096df5cb [environment] Fix url-quote-magic
`url-quote-magic` automatically escapes characters that fit a URI scheme
as you type. From what I can tell from the commit history, this was
mistakenly placed in `else` branch of the nested conditional instead of
at the end of the outermost conditional.

Closes #160
2017-04-11 13:29:53 -05:00
Eric Nielsen
53a3cd7933 Fix git-info arbitrary command execution exposure
The contents of git_info are subject to expansion by the shell. Avoid
putting raw ref names in the prompt to protect the user from arbitrary
code execution via specially crafted ref names (e.g., a ref named
'$(IFS=_;cmd=sudo_rm_-rf_/;$cmd)' would execute 'sudo rm -rf /' when the
prompt is drawn). Instead, put the ref names in new global variables and
reference these variables from git_info.

See:
- https://github.com/njhartwell/pw3nage
- 8976500cbb

Fixes #158, Closes #159
2017-03-30 10:17:03 -07:00
Eric Nielsen
f3e673a52b Rewrite steeef theme using git-info
This uses the verbose mode to be able to display indexed, unindexed and
untracked files indicators. This is the last theme left to be migrated
to git-info, and the first one to use its verbose mode.

Originally, the theme also supported svn via vcs_info. The svn support
is lost in this rewrite. Maybe if a new svn-info module is introduced to
Zim...

Closes #157
2017-03-29 19:40:07 -07:00
Eric Nielsen
0df896c3f1 Change git-info verbose mode implementation
so it behaves alike the non-verbose mode. For example, in the "merge"
special action context, files are being reported as both indexed and
unindexed by `git diff-index` and `git diff-files` commands in
non-verbose mode. That was not the case with the regular expressions
used in the verbose mode.
2017-03-29 19:40:03 -07:00
Sebastian S
449634a99e git-commit-list: fix typo
command is written with two m, not three.

Closes #156
2017-03-29 12:57:05 -07:00
Eric Nielsen
ae771c878f Rewrite minimal theme using git-info
As previous migrations of themes to git-info, this does not use its
verbose mode, so a repo with just untracked files is not considered
dirty.

It uses the newly-introduced `diverged` context and `coalesce` function
from git-info.

Closes #152
2017-03-27 13:56:47 -07:00