Replace printf with builtin printf to by pass local indirections#4684
Merged
Conversation
On macos, having run `brew install coreutils`, which installed GNU version of `printf`, this script/completion would sometimes complain about the (now missing) `-v` option usage. This change set ensures the `-v` option is available where needed. Note: there is a precedent of qualify which tool to run e.g. `command find ...`, `command dirname ...`, etc, so hopefully `builtin printf ...` should not cause any offense.
Owner
Isn't it named |
Owner
|
Whatever the case, this is the right thing to do. Merged, thanks. |
Contributor
Author
Hey so sorry, I started a reply earlier; yes, reminded by your comment, I realise that both:
|
Contributor
Author
Awesome. And FZF is awesome |
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Mar 3, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [junegunn/fzf](https://github.com/junegunn/fzf) | minor | `v0.68.0` → `v0.70.0` | 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.70.0`](https://github.com/junegunn/fzf/releases/tag/v0.70.0): 0.70.0 [Compare Source](junegunn/fzf@v0.68.0...v0.70.0) #### Demo: `change-with-nth` <https://github.com/user-attachments/assets/40abe7e6-8c98-4a13-85b7-17e69372ef9e> #### Summary - Added `change-with-nth` action for dynamically changing the `--with-nth` option. - Requires `--with-nth` to be set initially. - Multiple options separated by `|` can be given to cycle through. ```sh echo -e "a b c\nd e f\ng h i" | fzf --with-nth .. \ --bind 'space:change-with-nth(1|2|3|1,3|2,3|)' ``` - Added `change-header-lines` action for dynamically changing the `--header-lines` option - Performance improvements (1.3x to 1.9x faster filtering depending on query) ``` === query: 'l' === [all] baseline: 168.87ms current: 95.21ms (1.77x) matches: 5069891 (94.78%) [1T] baseline: 1652.22ms current: 841.40ms (1.96x) matches: 5069891 (94.78%) === query: 'lin' === [all] baseline: 343.27ms current: 252.59ms (1.36x) matches: 3516507 (65.74%) [1T] baseline: 3199.89ms current: 2230.64ms (1.43x) matches: 3516507 (65.74%) === query: 'linux' === [all] baseline: 85.47ms current: 63.72ms (1.34x) matches: 307229 (5.74%) [1T] baseline: 774.64ms current: 589.32ms (1.31x) matches: 307229 (5.74%) === query: 'linuxlinux' === [all] baseline: 55.13ms current: 35.67ms (1.55x) matches: 12230 (0.23%) [1T] baseline: 461.99ms current: 332.38ms (1.39x) matches: 12230 (0.23%) === query: 'linuxlinuxlinux' === [all] baseline: 51.77ms current: 32.53ms (1.59x) matches: 865 (0.02%) [1T] baseline: 409.99ms current: 296.33ms (1.38x) matches: 865 (0.02%) ``` - Fixed `nth` attribute merge order to respect precedence hierarchy ([#​4697](junegunn/fzf#4697)) - bash: Replaced `printf` with builtin `printf` to bypass local indirections ([#​4684](junegunn/fzf#4684)) ([@​DarrenBishop](https://github.com/DarrenBishop)) </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:eyJjcmVhdGVkSW5WZXIiOiI0My40Ni42IiwidXBkYXRlZEluVmVyIjoiNDMuNDYuNiIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
On macos, having run
brew install coreutils, which installed GNU version ofprintf, this script/completion would sometimes complain about the (now missing)-voption usage.This change set ensures the
-voption is available where needed.Note: there is a precedent of qualifying which tool to run e.g.
command find ...,command dirname ..., etc, so hopefullybuiltin printf ...should not cause any offense.