1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-16 14:41:02 +02:00
Commit graph

731 commits

Author SHA1 Message Date
Barton E. Schaefer
e3884c60ed 38866: update add-zle-hook-widget doc for 38850, bug fixes
Edge case handling, wrap in anonymous function for kshautoload management.
2016-07-17 12:04:48 -07:00
Barton E. Schaefer
3e61af3ff4 38850: Simplify indexing scheme to store hooks in the order they are added
Also, better handling of edge cases and of autoloading/sourcing file
2016-07-13 22:14:54 -07:00
Peter Stephenson
c135c416b2 38796: Fix subword matching on last character of subword. 2016-07-08 15:32:44 +01:00
Peter Stephenson
a7d5d239e6 38783: zcalc tweaks for RPN mode.
Make it more straightforward to exchange variables with stack.
2016-07-04 12:08:14 +01:00
Oliver Kiddle
a73ae70e82 38770: vi upper/lowercase widgets and shell widget example that reads a vi movement 2016-06-29 17:05:06 +02:00
Oliver Kiddle
76f28cc908 38749: fixes for case at start of a line and for ksharrays 2016-06-22 22:15:52 +02:00
Peter Stephenson
26c01f5711 38737: clean up zcalc variables.
Undocumented variables now start with "_".
2016-06-21 17:26:35 +01:00
Peter Stephenson
5103c85abb 38736: various RPN mode enhancements for zcalc 2016-06-21 16:34:55 +01:00
Barton E. Schaefer
0b8ab3a21a 38715: add-zle-hook-widget: assorted ksharrays fixes; assign an index to any hook that is added without one, to preserve append ordering 2016-06-19 19:50:37 -07:00
Barton E. Schaefer
61a383ec4d unposted: zed needs localoptions noksharrays 2016-06-18 16:18:52 -07:00
Peter Stephenson
4cacf1624f 38693: Add RPN mode to zcalc 2016-06-16 11:39:42 +01:00
Barton E. Schaefer
8e2ec4517f 38670: New function for managing ZLE special widgets, modeled after Functions/Misc/add-zsh-hook. 2016-06-12 18:50:10 -07:00
Oliver Kiddle
20948d0889 38579: simplify saving and restoring of state 2016-06-09 22:58:45 +02:00
Daniel Shahaf
7a5ecf4909 38610: vcs_info quilt: Extract a patch subject, 2.0. 2016-06-06 08:10:12 +00:00
Daniel Shahaf
e8943e7007 38609: vcs_info quilt: Factor out a helper function. No functional change. 2016-06-06 08:10:11 +00:00
Daniel Shahaf
29e88b3ea3 unposted: Commit forgotten part of users/21256. 2016-05-10 18:39:18 +00:00
Barton E. Schaefer
c5c2fa4fb5 unposted: update documentary comments to remove references to self-insert-unmeta. 2016-05-09 08:27:52 -07:00
Barton E. Schaefer
e54578ff74 37971: fix potential issues when interacting with user-defined widgets
Cf. users/21284: Eric Freese
2016-02-14 11:35:18 -08:00
Kamil Dudka
c7edb354c7 37814: run-help-ip: use an absolute path for the shebang. 2016-01-28 20:55:23 -05:00
Daniel Shahaf
a45a9fa104 unposted: Fix typo in comment. 2016-01-15 06:30:06 +00:00
Daniel Shahaf
ce1148db45 37612: vcs_info git: Set $git_patches_unapplied correctly for 'rebase-apply' case.
This manifested, e.g., in 'git am' of a single patch that had a conflict.
2016-01-15 06:29:09 +00:00
Barton E. Schaefer
4a30b542a0 37570: give truth to the doc assertion transpose-words-match is a drop-in replacement for transpose-words 2016-01-13 19:51:07 -08:00
Barton E. Schaefer
c275839033 37567: use (Z:n:) to split the buffer into words so line breaks are treated as whitespace 2016-01-13 19:50:24 -08:00
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
Barton E. Schaefer
795e6eb9b3 36195, 36196: wrapper of bracketed-paste for compatibilty with url-quote-magic and other self-insert wrapper widgets 2015-08-16 22:23:06 -07:00
Oliver Kiddle
832130c57d 36131: make use of undo limits; call mkundoent() when $UNDO_CHANGE_NO is referenced for a clear change number marking the current state 2015-08-13 16:18:26 +02:00
Mikael Magnusson
c5abf2bcff 36077: vcs_info: stop exporting everything 2015-08-12 04:31:22 +02:00
Oliver Kiddle
8bbfbfebbc unposted (c.f. Bart: 35902): use - after zle -U in case $key is - 2015-08-05 15:44:18 +02:00
Barton E. Schaefer
e0980e91be 35937: wait for process IDs instead of job numbers in parallel mode 2015-07-27 09:44:10 -07:00
Barton E. Schaefer
1629d5bcbd add RPS2 handling to "prompt bart", update help text, clean up indentation whitespace 2015-07-25 15:48:10 -07:00
Daniel Shahaf
a8e18dc370 35807: edit-command-line: Fix for non-7bit-data (after 35769)
Bug reported and fix suggested by Mikael.
2015-07-24 14:11:27 +00:00
Oliver Kiddle
a925d036fc 35815: fix for lack of startup output from newer nslookup 2015-07-23 05:25:37 +02:00
Barton E. Schaefer
045bd4e3a6 35823: fix handling of MARK and CURSOR, clean up documentary comment 2015-07-22 12:48:03 -07:00
Daniel Shahaf
35ffe36318 35769: edit-command-line: Go to the right byte offset 2015-07-13 23:21:54 +00:00
Oliver Kiddle
5911aca85f 35737: (tweaked c.f. Peter: 35759): use new undo limit for minibuffer and beep when limit is reached 2015-07-14 00:30:45 +02:00
Barton E. Schaefer
7bc47c91e9 35660: prompt_adam1_setup: avoid perl, fix help 2015-06-28 20:19:04 -07:00
Mikael Magnusson
ea0f612c3a 35558: narrow-to-region: Use unique parameter names for new feature 2015-06-22 03:37:29 +02:00
Peter Stephenson
09e1b2434d 35545: enhance narrow-to-region to return LBUFFER and RBUFFER 2015-06-21 18:16:40 +01:00
Barton E. Schaefer
9f3dc6605a 35469: test UNDO_CHANGE_NO to determine whether to start over or use the next history event 2015-06-14 20:12:42 -07:00
Peter Stephenson
2abba7243a 35386: expand tabs where useful in builtins outputing function.
Also add to zed -f.

Option is -x <numm>.
2015-06-05 11:21:22 +01:00
Han Pingtian
fea56dc32b 35234: better zfget completion with paths 2015-05-30 20:11:19 +01:00
Daniel Hahler
f080429439 35285: _cdr: fix zstyle lookup for recent-dirs-insert
The string was quoted incorrectly and missed the final ":".
2015-05-27 19:35:59 +02:00
Han Pingtian
2d86de91c1 35299: Improve effect of zfdir -r 2015-05-27 09:32:15 +01:00
Han Pingtian
9a6f55dc7a 35295: Try harder with zftp directory listing 2015-05-26 09:46:25 +01:00
Oliver Kiddle
d257f0143e 35093: new zle widgets for Vim-style text objects 2015-05-13 23:05:20 +02:00
Peter Stephenson
235e9bd1bf 34721: new glob qualifier functions before, after 2015-03-16 15:09:16 +00:00
Daniel Shahaf
57be7b743f 34673: vcs_info git: Fix error message when rebase hasn't started 2015-03-09 20:03:37 +00:00
Daniel Shahaf
9d25fd7255 vcs_info hg: Support inactive bookmarks
(Similar to git detached heads)
2015-01-25 01:42:05 +01:00
Marc Finet
9ea817acda PATCH: 34333: vcs_info quilt: fix unapplied detection in subdir
When patches are applied, let quilt use .pc without forcing the
patch directory, this will fix the unapplied detection when being in
subdir.
When no patches are applied, use zstyle quilt-patch-dir then
QUILT_PATCHES then "patches" for path to search for patches.

Note: prefer setting quilt-patch-dir rather than QUILT_PATCHES for
absolute path because when patches are applied, quilt unapplied will
not return the correct list (i.e. the whole list rather that the one
specified by .pc/.quilt_series).
2015-01-22 00:15:20 +01:00
Barton E. Schaefer
5caf317c3a unposted (cf. 34218): : remove -m from zmodload calls 2015-01-10 18:06:43 -08:00
Barton E. Schaefer
199581f780 34202: safe tempfile creation part 3 -- use zf_ln instead of mv 2015-01-10 10:32:31 -08:00