Skip to content
Myr

docs: document PowerShell placeholder quoting requirement

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Closes #735

authored by Yoshi Tacke · committed by Yoshi Tacke · parent 90e73d7 · Browse files · 2 files+20 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+20 added−0 removed

  • other:+20 added−0 removed

2 files+20 added−0 removed

modified:CHANGELOG.md+3 added
4 unmodified lines
56## Bugfixes7- Handle invalid working directories gracefully when using `--full-path`, see #1900 (@Xavrir).89## Documentation10- Document PowerShell placeholder quoting requirement in the troubleshooting section, see #735 (@YoshKoz)1112# 10.4.21314## Bugfixes15- Fixed performance regression due to `--ignore-contain`; see #1913 and #1914
845 unmodified lines
modified:README.md+17 added
442 unmodified lines
443you can use `export -f my_function` to make available to child processes. You would still444need to call `fd -x bash -c 'my_function "$1"' bash`. For other use cases or shells, use445a (temporary) shell script.446447### Placeholders (`{}`, `{/}`, `{//}`, `{.}`, `{/.}`) in PowerShell448449In PowerShell (both Windows PowerShell and PowerShell 7+), curly braces `{}` are reserved450for script blocks. Passing them unquoted to `fd -x`/`fd -X` will cause PowerShell to451interpret them before `fd` sees them, breaking the placeholder. Wrap any placeholder in452single quotes (or escape the braces with backticks):453454``` powershell455# Won't work — PowerShell parses `{/}` as a script block:456fd -e txt -x echo {/}457458# Works — single quotes pass `{/}` through to fd untouched:459fd -e txt -x echo '{/}'460```461462The same rule applies to `{}`, `{//}`, `{.}`, and `{/.}`.463464## Integration with other programs465466### Using fd with `fzf`467
335 unmodified lines