{"id":61,"date":"2015-10-06T20:48:52","date_gmt":"2015-10-06T19:48:52","guid":{"rendered":"http:\/\/188.166.119.205\/?p=61"},"modified":"2026-11-10T05:52:03","modified_gmt":"2026-11-10T05:52:03","slug":"fish-shell-brace-expansion","status":"publish","type":"post","link":"https:\/\/banyek.net\/?p=61&lang=en","title":{"rendered":"Fish shell brace expansion"},"content":{"rendered":"<p>I mentioned that I use the fish shell, but I would like to share a common problem of mine \u2013 well, so far this is the only one I found.<\/p>\n<p>I commonly use commands like this<\/p>\n<pre><code>find . -maxdepth 1 -type d -exec du -sh {} \\;\n<\/code><\/pre>\n<p>This works great with bash, but in fish, you got the following error message<\/p>\n<pre><code> du: fts_open: No such file or directory\n<\/code><\/pre>\n<p>This happens because fish acts more aggressive on brace expansion than bash. It doesn\u2019t treats it as a part of a command, but tries to expand it \u2013 but cannot succeed, because there is nothing.<br \/>\nSimply put that inside apostrophes and the shell will skip the brace expansion.<\/p>\n<pre><code>find . -maxdepth 1 -type d -exec du -sh '{}' \\;\n<\/code><\/pre>\n<p>Not a big thing, but handy.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I mentioned that I use the fish shell, but I would like to share a common problem of mine \u2013 well, so far this is the only one I found. I commonly use commands like this find . -maxdepth 1 -type d -exec du -sh {} \\; This works great with bash, but in fish, [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[134],"tags":[214,126],"class_list":["post-61","post","type-post","status-publish","format-standard","hentry","category-tech-en","tag-fish-shell-en","tag-oldblog-en"],"_links":{"self":[{"href":"https:\/\/banyek.net\/index.php?rest_route=\/wp\/v2\/posts\/61","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/banyek.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/banyek.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/banyek.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/banyek.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=61"}],"version-history":[{"count":1,"href":"https:\/\/banyek.net\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions"}],"predecessor-version":[{"id":426,"href":"https:\/\/banyek.net\/index.php?rest_route=\/wp\/v2\/posts\/61\/revisions\/426"}],"wp:attachment":[{"href":"https:\/\/banyek.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=61"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/banyek.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=61"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/banyek.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=61"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}