{"id":5251,"date":"2017-06-05T18:41:13","date_gmt":"2017-06-05T15:41:13","guid":{"rendered":"http:\/\/mummila.net\/kommentit\/?p=5251"},"modified":"2017-06-05T18:41:13","modified_gmt":"2017-06-05T15:41:13","slug":"git-add-completion-fails-when-using-filenames-with-scandinavian-characters","status":"publish","type":"post","link":"https:\/\/mummila.net\/kommentit\/2017\/06\/05\/git-add-completion-fails-when-using-filenames-with-scandinavian-characters\/","title":{"rendered":"`git add` completion fails when using filenames with Scandinavian characters"},"content":{"rendered":"<p>== Background ==<\/p>\n<p>Reporting from Xenial, but this is currently reproducible in Artsy too.<\/p>\n<p>$ locale<br \/>\nLANG=fi_FI.UTF-8<br \/>\nLANGUAGE=fi:en<br \/>\nLC_CTYPE=fi_FI.UTF-8<br \/>\nLC_NUMERIC=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_TIME=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_COLLATE=fi_FI.UTF-8<br \/>\nLC_MONETARY=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_MESSAGES=fi_FI.UTF-8<br \/>\nLC_PAPER=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_NAME=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_ADDRESS=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_TELEPHONE=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_MEASUREMENT=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_IDENTIFICATION=&#8221;fi_FI.UTF-8&#8243;<br \/>\nLC_ALL=<\/p>\n<p>== Test case ==<\/p>\n<p>$ git init test<br \/>\n$ cd test<br \/>\n$ echo &#8221;foo&#8221; &gt; b\u00e4r<br \/>\n$ git add  [hit tab key]<br \/>\n$ git add \\&#8221;b\\\\303\\\\244r\\&#8221;  [hit enter]<\/p>\n<p>== What happens ==<\/p>\n<p>fatal: pathspec &#8217;&#8221;b\\303\\244r&#8221;&#8217; did not match any files<\/p>\n<p>== What I expect to happen ==<\/p>\n<p>For the filename to be correctly completed, like with ls:<\/p>\n<p>$ mkdir test2<br \/>\n$ cd test2<br \/>\n$ echo &#8221;foo&#8221; &gt; b\u00e4r<br \/>\n$ ls [hit tab key]<br \/>\n$ ls b\u00e4r [hit enter]<br \/>\nb\u00e4r<\/p>\n","protected":false},"excerpt":{"rendered":"<p>git add [tab] incorrectly completes filenames with scandinavian characters with escape codes, resulting in fatal: pathspec \u2026 did not match any files.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8860],"tags":[12483],"class_list":["post-5251","post","type-post","status-publish","format-standard","hentry","category-vianhallintajarjestelmat","tag-git","sijainti-launchpad"],"_links":{"self":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5251","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/comments?post=5251"}],"version-history":[{"count":3,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5251\/revisions"}],"predecessor-version":[{"id":5254,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/posts\/5251\/revisions\/5254"}],"wp:attachment":[{"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/media?parent=5251"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/categories?post=5251"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mummila.net\/kommentit\/wp-json\/wp\/v2\/tags?post=5251"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}