Christos explained that tcsh escaping is tricky, buggy, and "fixing" it in a proper way can break legacy scripts.
I propose to fix the problem on the Midnight Commander side instead. To prevent messages like 'Warning: Cannot change to /tmp/a b/c d..' and failure to cd to such directories when using mc with recent versions of tcsh (SHELL=/bin/tcsh), mc can be patched (src/subshell/common.c) the following way: %b should not be escaped (or escaped with single quotes), because there are no ambiguities. See the attached diff for an example. I've tested the patch with different shells: tcsh (both old and new), bash, zsh, fish. I also propose pushing this patch to the upstream (https://github.com/MidnightCommander/mc), and I will contact the dev team correspondingly. ** Patch added: "mc.diff" https://bugs.launchpad.net/ubuntu/+source/tcsh/+bug/1706223/+attachment/4944962/+files/mc.diff ** Also affects: mc Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1706223 Title: Escaping broken To manage notifications about this bug go to: https://bugs.launchpad.net/mc/+bug/1706223/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs