diff --git a/doc_src/faq.hdr b/doc_src/faq.hdr index 3e8c605f9..045903afa 100644 --- a/doc_src/faq.hdr +++ b/doc_src/faq.hdr @@ -23,6 +23,7 @@ - I'm seeing weird output before each prompt when using screen. What's wrong? - How do I change the greeting message? - Why doesn't history substitution ("!$" etc.) work? +- Why do I get a missing argument error with `find ... {}`? - How to make `-` a shortcut for `cd -`? - How do I uninstall fish? - Where can I find extra tools for fish? @@ -223,6 +224,21 @@ Fish history recall is very simple yet effective: See documentation for more details about line editing in fish. +
+\section faq-find-braces Why do I get a missing argument error with `find ... {}`? + +Running `find ... -exec ... {}` produces an error: + + find: missing argument to '-exec' + +The problem is caused by the empty braces, which are subject to brace expansion. + +Quote the empty braces to achieve the desired effect: + +\fish{cli-dark} +find ... -exec ... '{{}}' +\endfish +
\section faq-cd-minus How to make `-` a shortcut for `cd -`?