Bruno Haible writes: Hi Bruno, > Ah, you meant, I made a mistake while applying your patch? Indeed, I had > not noticed the change from tramp-test-instrument-test-case to > tramp--test-instrument-test-case. Now I fixed that. Find attached the two > output files. I truncated the file '*debug tramp mock netbsd93.bruno.haible.de*' > to 10000 lines, since it starts to repeat itself (modulo time stamps) after > line 6499. Thanks, this has told us the story, indeed. The last command Tramp has sent is --8<---------------cut here---------------start------------->8--- 16:04:12.381001 tramp-send-command (6) # /bin/ls -ild -w /tmp/tramp-testXwo544/foo/\ foo\ bar\ baz\ \@foo\@bar\@baz\@\$foo\$bar\$\$baz\$-foo-bar-baz-\%foo\%bar\%baz\%\&foo\&bar\&baz\&\?foo\?bar\?baz\?\*foo\+bar\*baz\+\'foo\"bar\'baz\"\#foo\~bar\#baz\~\!foo\|bar\!baz\|\:foo\;bar\:baz\;\bar\\(foo\)bar\(baz\)\[foo\]bar\[baz\]\{foo\}bar\{baz\}/\ foo\ bar\ baz\ \@foo\@bar\@baz\@\$foo\$bar\$\$baz\$-foo-bar-baz-\%foo\%bar\%baz\%\&foo\&bar\&baz\&\?foo\?bar\?baz\?\*foo\+bar\*baz\+\'foo\"bar\'baz\"\#foo\~bar\#baz\~\!foo\|bar\!baz\|\:foo\;bar\:baz\;\bar\\(foo\)bar\(baz\)\[foo\]bar\[baz\]\{foo\}bar\{baz\}; /bin/ls -lnd -w /tmp/tramp-testXwo544/foo/\ foo\ bar\ baz\ \@foo\@bar\@baz\@\$foo\$bar\$\$baz\$-foo-bar-baz-\%foo\%bar\%baz\%\&foo\&bar\&baz\&\?foo\?bar\?baz\?\*foo\+bar\*baz\+\'foo\"bar\'baz\"\#foo\~bar\#baz\~\!foo\|bar\!baz\|\:foo\;bar\:baz\;\bar\\(foo\)bar\(baz\)\[foo\]bar\[baz\]\{foo\}bar\{baz\}/\ foo\ bar\ baz\ \@foo\@bar\@baz\@\$foo\$bar\$\$baz\$-foo-bar-baz-\%foo\%bar\%baz\%\&foo\&bar\&baz\&\?foo\?bar\?baz\?\*foo\+bar\*baz\+\'foo\"bar\'baz\"\#foo\~bar\#baz\~\!foo\|bar\!baz\|\:foo\;bar\:baz\;\bar\\(foo\)bar\(baz\)\[foo\]bar\[baz\]\{foo\}bar\{baz\} --8<---------------cut here---------------end--------------->8--- Yes, one line. This is too long for your shell. I have modified tramp-sh.el (see appended), could you pls give it a test? > Bruno Best regards, Michael.