-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix zsh $+commands[perl] syntax does not work with setopt ksh_arrays #4084
Conversation
Thank you again1. DESCRIPTION OF OPTIONS
In the following list, options set by default in all emulations are marked <D>; those set by
default only in csh, ksh, sh, or zsh emulations are marked <C>, <K>, <S>, <Z> as appropri-
ate.
KSH_ARRAYS <K> <S>
Emulate ksh array handling as closely as possible. If this option is set, array ele-
ments are numbered from zero, an array parameter without subscript refers to the
first element instead of the whole array, and braces are required to delimit a sub-
script (`${path[2]}' rather than just `$path[2]') or to apply modifiers to any param-
eter (`${PWD:h}' rather than `$PWD:h'). I always feel bad about such mistakes because they are preventable. Given that the original message was deleted and we no longer have the details EDIT: The question was mainly for the maintainer, but feedback Footnotes |
It was a long time ago and I don't really remember the details. I'd like to keep the change small for now and release a new patch version soon because this can be seen as a regression in 0.56.1. |
Approved. |
Thanks @lincheney for the patch. And thanks @LangLangBart for the review. |
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [junegunn/fzf](https://github.com/junegunn/fzf) | minor | `v0.55.0` -> `v0.56.3` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>junegunn/fzf (junegunn/fzf)</summary> ### [`v0.56.3`](https://github.com/junegunn/fzf/releases/tag/v0.56.3): 0.56.3 [Compare Source](junegunn/fzf@v0.56.2...v0.56.3) - Bug fixes in zsh scripts - fix(zsh): handle backtick trigger edge case ([#​4090](junegunn/fzf#4090)) - revert(zsh): remove 'fc -RI' call in the history widget ([#​4093](junegunn/fzf#4093)) - Thanks to [@​LangLangBart](https://github.com/LangLangBart) for the contributions ### [`v0.56.2`](https://github.com/junegunn/fzf/releases/tag/v0.56.2): 0.56.2 [Compare Source](junegunn/fzf@v0.56.1...v0.56.2) - Bug fixes - Fixed abnormal scrolling behavior when `--wrap` is set ([#​4083](junegunn/fzf#4083)) - \[zsh] Fixed warning message when `ksh_arrays` is set ([#​4084](junegunn/fzf#4084)) ### [`v0.56.1`](https://github.com/junegunn/fzf/releases/tag/v0.56.1): 0.56.1 [Compare Source](junegunn/fzf@v0.56.0...v0.56.1) - Bug fixes and improvements - Fixed a race condition which would cause fzf to present stale results after `reload` ([#​4070](junegunn/fzf#4070)) - `page-up` and `page-down` actions now work correctly with multi-line items ([#​4069](junegunn/fzf#4069)) - `{n}` is allowed in `SCROLL` expression in `--preview-window` ([#​4079](junegunn/fzf#4079)) - \[zsh] Fixed regression in history loading with shared option ([#​4071](junegunn/fzf#4071)) - \[zsh] Better command extraction in zsh completion ([#​4082](junegunn/fzf#4082)) - Thanks to [@​LangLangBart](https://github.com/LangLangBart), [@​jaydee-coder](https://github.com/jaydee-coder), [@​alex-huff](https://github.com/alex-huff), and [@​vejkse](https://github.com/vejkse) for the contributions ### [`v0.56.0`](https://github.com/junegunn/fzf/releases/tag/v0.56.0): 0.56.0 [Compare Source](junegunn/fzf@v0.55.0...v0.56.0) - Added `--gap[=N]` option to display empty lines between items. - This can be useful to visually separate adjacent multi-line items. ```sh ``` ### All bash functions, highlighted declare -f | perl -0777 -pe 's/^}\n/}\0/gm' | bat --plain --language bash --color always | fzf --read0 --ansi --reverse --multi --highlight-line --gap ``` <img width="855" alt="image" src="https://github.com/user-attachments/assets/b3d2eaf2-bf44-4e3a-8d7b-9878629dd9be"> - Or just to make the list easier to read. For single-line items, you probably want to set `--color gutter:-1` as well to hide the gutter. ```sh fzf --info inline-right --gap --color gutter:-1 ``` <img width="855" alt="image" src="https://github.com/user-attachments/assets/113757a1-ccfd-42a6-b946-83533f408e69"> - Added `noinfo` option to `--preview-window` to hide the scroll indicator in the preview window - Bug fixes - Thanks to [@​LangLangBart](https://github.com/LangLangBart), [@​akinomyoga](https://github.com/akinomyoga), and [@​charlievieth](https://github.com/charlievieth) for fixing the bugs </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy40NDAuNyIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJSZW5vdmF0ZSBCb3QiXX0=-->
When
setopt ksh_arrays
in zsh, the syntax$+commands[perl]
doesn't work properly and gives a syntax warning sayingfzf-history-widget:6: bad output format specification
I think the everything else still actually works, just the warning is a bit annoying.
I have setopt ksh_arrays set in my zshrc.