1
0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-09-27 06:22:20 +02:00
Commit Graph

658 Commits

Author SHA1 Message Date
Frank Terbeck
dab6e7c231 37451: vcs_info: Declare "msgs" in early context
The parameter *is* being declared with the redefinition of the
function, but not in its initial form, which gets you a warning
about the parameter being defined globally. This fixes it.
2015-12-30 15:23:08 +01:00
Philip Sequeira
038b1d4b38 37345: VCS_INFO functions break with setopt no_unset
With setopt no_unset in my config file, vcs_info fails with:
VCS_INFO_maxexports:7: vcs: parameter not set
2015-12-23 01:57:45 +01:00
Barton E. Schaefer
aedff53d1f users/21082 (expanded): a more complete sorting of version strings that are not in the form of zsh version numbers; additional explanatory comment 2015-12-19 22:03:34 -08:00
Barton E. Schaefer
597ffd85ed users/21068: use emacs keymap in vared by default 2015-12-19 16:52:38 -08:00
Daniel Shahaf
1f2bdc2aa2 unposted (after users/20873): Theoretical fix: don't parse print/echo escape sequences in $zle_bracketed_paste. 2015-12-19 10:48:48 +00:00
Peter Stephenson
53bc8ef2d8 37400: typo gave unwanted error message in zsh_directory_name_generic 2015-12-14 10:59:03 +00:00
Peter Stephenson
1f75d7ff2c 37386: localise mbegin, mend, match in URL magic 2015-12-11 14:05:29 +00:00
Oliver Kiddle
f546ea64df users/20873: disable bracketed paste while running external editor from zle 2015-12-11 05:34:48 +01:00
Peter Stephenson
4105f79a3a 37347: Remove incorrect local for msgs in VCS info 2015-12-08 12:59:48 +00:00
Daniel Shahaf
253df6d4bb 37295: kill-word-match: Join kills 2015-12-03 23:47:24 +00:00
Daniel Shahaf
502d55c014 37252: vcs_info git: Compute %b correctly with "rebase --onto" of detached heads. (Follow-up to 36725.) 2015-11-30 03:42:47 +00:00
Peter Stephenson
8efa4b4088 unposted: ZCALCPROMPT created globally in zcalc 2015-11-27 09:31:46 +00:00
Daniel Shahaf
694aee4c3d 37214: 'prompt walters': Don't export PS1 2015-11-27 07:27:23 +00:00
Barton E. Schaefer
14487ff5cc 37192: silence WARN_CREATE_GLOBAL in prompt themes 2015-11-22 10:19:49 -08:00
Peter Stephenson
ae4cf7b743 37186: a couple more WARN_CREATE_GLOBAL fixes 2015-11-22 16:06:20 +00:00
Peter Stephenson
4add525883 37170: suppress global create warning in function 2015-11-20 12:42:35 +00:00
Eric Cook
8d1e882b78 zed: Add -- to the `functions' builtin calls
Reported on IRC:

% autoload zed; zed -f -- "-zgen-prezto-load"
zed:83: bad option: -g
-zgen-prezto-load() {
}
2015-11-16 02:58:03 +01:00
Daniel Shahaf
f59864ce7a 37025: vcs_info git: Add a cherry-pick patch-format 2015-11-13 20:17:27 +00:00
Eric Cook
607a7a85b6 36993: zed: fix argument parsing 2015-10-31 19:06:47 +01:00
Peter Stephenson
1eef57b3d1 37027: allow subword context to discriminate between words 2015-10-30 16:59:41 +00:00
Peter Stephenson
0628802baf 37014: Improved internal parameter setting.
Enhance WARNCREATEGLOBAL to work in many more cases.

Don't create REPLY as an integer if it didn't previously exist
as one, even if the value to be set is integral, as this is likely to
mess up later uses of REPLY.
2015-10-29 15:01:07 +00:00
Barton E. Schaefer
aba7c00698 36994: declare local REPLY for use with "zle .read-command"; use .self-insert instead of .self-insert-unmeta 2015-10-27 20:29:07 -07:00
Daniel Shahaf
779b3112f8 36913 + 36945: vcs_info quilt: Pass patch subject lines to gen-applied-string
The format used is '${patchname} ${subject}', which is analogous to the git backend.
2015-10-24 20:42:26 +00:00
Daniel Shahaf
c62db9e7dc 36912: vcs_info quilt: Tolerate being in child of .pc's parent
Without this, gen-applied-string would only be set when .pc is a child of cwd,
not when it is a child of an ancestor of cwd.
2015-10-24 20:26:41 +00:00
Barton E. Schaefer
b947789d7c 36871: move initial call to "zle .bracketed-paste-magic" to occur earlier in the function
Just in case any later initialization might have side-effects.
2015-10-21 14:47:41 -07:00
Frank Terbeck
2e600b432a 36888: vcs_info: Prevent warn_create_global warning with '-preinit-' state
This is related to 33405. Turns out that not all other calls to
VCS_INFO_set are okay: With recent zsh versions the early call to that
function with the '-preinit-' argument causes a warning like this:

  VCS_INFO_set:9: math parameter maxexports created globally
                  in function VCS_INFO_set

This fixes it.
2015-10-18 20:40:18 +02:00
Peter Stephenson
bab1fc5043 36856: cdr -p/-P to prune directory list 2015-10-14 14:23:16 +01:00
Frank Terbeck
e245dd7193 36832: vcs_info: Remove dependency on "seq"
The "seq" utility is usually available on GNU systems only. This
exchanges calls to seq with pure zsh features. Also: Less forks are
good.
2015-10-11 12:54:30 +02:00
Frank Terbeck
7a1678767f 36830: vcs_info: Silence an error message with new git versions
Mikael informs me on IRC, that in new versions of git (he used 2.6.1)
where the "am" subcommand is now a builtin, a file that is used by the
git backend of vcs_info (namely .git/rebase-apply/msg-clean) is not
available anymore, leading to an annoying error message:

  VCS_INFO_get_data_git:232: no such file or directory: .git/rebase-apply/msg-clean

This patch checks for the availabiliy of the file before using it,
and adjusts the value of the dependant values accordingly.
2015-10-11 12:29:41 +02:00
Mikael Magnusson
64061e504f 36754: Functions/TCP: Tweak some usage output in the tcp_* functions 2015-10-03 00:05:40 +02:00
Mikael Magnusson
99aff5bb0c unposted: bracketed-paste-url-magic: actually do what the comment says 2015-10-01 20:16:24 +02:00
Peter Stephenson
196e6a0ec0 36735: add ~/.zcalcrc handling to zcalc 2015-10-01 15:55:01 +01:00
Mikael Magnusson
76da752fd7 36692: bracketed-paste-url-magic: simpler alternative for handling pasted urls 2015-10-01 03:55:21 +02:00
Daniel Shahaf
a90cf551ef 36725: vcs_info git: Compute %b correctly when "git am"-ing onto detached heads.
Before this patch, $gitbranch would be set to empty, which caused
VCS_INFO_get_data_git to early out with a failure status¹, consequently
$vcs_info_msg_0_ would be empty.

¹ via the 'if [[ -z ]]' block around line 170.
2015-09-30 21:43:37 +00:00
Daniel Shahaf
cd1cda9d57 36725: vcs_info git: Compute %b correctly when rebasing detached heads.
This sets the %b expando to the hash of the before-the-merge HEAD, rather
than to the literal string "detached HEAD".  That hash is already available
via the gen-applied-string hook.
2015-09-30 21:43:37 +00:00
Daniel Shahaf
7ac34a3055 36725: vcs_info git: Compute %b correctly when merging to detached heads.
The %b expando should be the hash prior to the merge.  The hash of the merge
result is available as the %i expando and via the gen-applied-string hook.
2015-09-30 21:43:37 +00:00
Daniel Hahler
45bdc87a1f 36601: vcs_info: handle missing .git/rebase-apply/{next,msg-clean}
When pressing Ctrl-C after `git am`, only `last` exists in
`.git/rebase-apply/`, which is empty.

This patch fixes it to fall back to "no patch applied" then.
2015-09-28 20:03:12 +02:00
Mikael Magnusson
d85a1fcd88 unposted: Fix broken case condition and "qualifer" typo 2015-09-28 02:24:54 +02:00
Peter Stephenson
649d06a8cd 36630: new function zsh_directory_name_generic 2015-09-25 21:30:34 +01:00
Barton E. Schaefer
8d5c0c7760 36604: fix getopts+shift calculation 2015-09-23 23:16:38 -07:00
Barton E. Schaefer
56ed4df898 36587: use +LINE:COLUMN to place the cursor when invoking emacs variants, for emacsclient 2015-09-22 08:52:52 -07:00
Barton E. Schaefer
b957cdd21a unposted: revert 36483 as multibyte is now handled by "zle .read-command"; adapt to new default behavior of zle_highlight for paste 2015-09-12 17:16:43 -07:00
Peter Stephenson
f5e8527a8c 36483: handle incomplete multibyte characters in bracketed-paste-magi 2015-09-11 18:40:22 +01:00
Daniel Shahaf
880579dc1e 36410: vcs_info git: Present merge heads as patches
This shows, during 'git merge', the revision hashes of the "remote" head
(the one that will become second parent of the commit) in the %m expando.

Review-by: Frank Terbeck
2015-09-05 10:47:44 +00:00
Axel Beckert
a9df6aaa70 36338: Replace "5.0.9" with "5.1" in source comments 2015-08-30 22:47:00 +02:00
Mikael Magnusson
095dd71cc0 36314: Avoid using short_loops syntax in distributed files 2015-08-28 09:37:37 +02:00
Barton E. Schaefer
2ed3b84fa6 36266: preserve emulation and setopt context for init and finish functions, handle vi modes 2015-08-21 13:38:19 -07:00
Barton E. Schaefer
c239a7bd91 36212: save and restore HISTNO along with other editor state, for sanity of "zle undo" 2015-08-17 20:59:00 -07:00
brian m. carlson
9a369d39e1 36209: vcs_info: avoid grep error message when file is missing
When running git rebase -m and a conflict occurs, the git-rebase-todo
file is not present.  This leads to an error from grep every time the
shell prompt is printed when vcs_info is enabled.  Avoid this message by
checking if the file exists before trying to grep it.
2015-08-18 01:00:25 +02:00
Barton E. Schaefer
2f2808098b unposted: mention bracketed-paste-magic in url-quote-magic comments 2015-08-16 22:52:21 -07:00