Repository navigation
Tags
Tags
FIX: No abort when no matches The comments in copycat_mode_start.sh mention that copycat_generate_results.sh will exit 0 if no results, but that is a separate script now (and isn't sourced), so it cannot abort the current shell's processing. The script actually needs to indicate an error via exit status 1, and copycat_mode_start.sh's main() can then "|| return 0" on that.
ENH: Allow starting copycat search via a key combination (or no prefix) By parsing a -Tkey-table argument before the actual key. Note: The other mappings don't support this; multi-key doesn't make sense for n/N and the predefined searches embed the key in the option name.
ENH: Allow hooking into copycat start and quit via new @copycat_on_mo…
…de_{start,quit} options
It may be necessary to hook into copycat mode to reapply other customizations. For example, I override the default n/N copy mode mappings so that the directions are static regardless of what (forward / backward) search was started, and copycat's overrides clash with that.
These options (well, I just need the start one, but for consistency quit has been added as well) allow to configure arbitrary shell code to run and therefore avoid modifying the plugin directly.
ENH: Support PCRE regexp pattern with /.../ syntax Sometimes a more powerful regular expression syntax is necessary, e.g. for lookahead / lookbehind. Or the user is more used to that regexp dialect, and prefers to use that. This enhancement allows to switch from Extended regexp syntax to PCRE by enclosing the pattern with "/".
Use PCRE-type regexp to match file names without the leading whitespace The extended-type regexp cannot assert a positive lookbehind (i.e. start of line or whitespace before the match) and has to include the whitespace. With PCRE, we can use \K to start the match only after that.
FIX: Handle custom copy mode mappings by letting them integrate with … …copycat on their own The bind / unbind of copy mode mappings does not work if a custom global mapping for that key already exists. For me, this resulted in copycat mode never being quit (regardless of how copy mode was quit, even through the built-in Enter it showed this), and as a result n/N always jumped to a match instead of being inserted literally. Let custom copy mode mappings integrate with tmux-copycat on their own; i.e. by explicitly invoking copycat_mode_quit.sh as part of their binding. Extend copycat_quit_copy_mode_keys() to skip those bindings that do this, by passing the target script into the function and filtering on that.
BUG: In copy mode, subsequent searches ignore the entered pattern and… … repeat the first search Fixes tmux-plugins#76 As mentioned in the comments of the issue, apparently the copycat mode first needs to be quit and then restarted. Instead of invoking the corresponding scripts, only the relevant parts from copycat_mode_quit.sh are added directly to copycat_search.sh; invoking copycat_mode_start.sh isn't necessary, as copycat_search.sh will do that, anyway.
Merge branches 'copy-mode-multiple-search-23', 'pcre-regexp-mode-23',… … 'fix-custom-copy-mode-mappings-23' and 'pcre-file-search-23' into tmux-23
ENH: Support PCRE regexp pattern with /.../ syntax Sometimes a more powerful regular expression syntax is necessary, e.g. for lookahead / lookbehind. Or the user is more used to that regexp dialect, and prefers to use that. This enhancement allows to switch from Extended regexp syntax to PCRE by enclosing the pattern with "/".
Use PCRE-type regexp to match file names without the leading whitespace The extended-type regexp cannot assert a positive lookbehind (i.e. start of line or whitespace before the match) and has to include the whitespace. With PCRE, we can use \K to start the match only after that.
PreviousNext