Bugs item #311399, was opened at 30/01/2009 10:03 Status: Open Priority: 2 Submitted By: David Paleino (hanska-guest) Assigned to: Nobody (None) Summary: DBTS 313514: bash-completion fails with e.g., ls and newlines in file names Distribution: None Originally reported in: Debian BTS Original bug number: 313514
Initial Comment: From: Anthony DeRobertis <a...@suespammers.org> To: Debian Bug Tracking System <sub...@bugs.debian.org> Subject: bash-completion fails with e.g., ls and newlines in file names Date: Tue, 14 Jun 2005 01:37:41 -0400 Package: bash Version: 3.0-15 Severity: minor File: /etc/bash_completion anth...@bohr:foo$ touch "$(echo -e 'foo\nbar')" anth...@bohr:foo$ ls -b foo\nbar anth...@bohr:foo$ ls f<tab><tab> bar foo Notice how instead of completing foo?bar (where ? = newline) it offers to complete either foo or bar. ---------------------------------------------------------------------- >Comment By: David Paleino (hanska-guest) Date: 30/01/2009 10:04 Message: From: Mike Dornberger <mike.dornber...@gmx.de> To: Debian Bug Tracking System <313...@bugs.debian.org> Subject: Re: bash-completion fails with e.g., ls and newlines in file names - workaround Date: Tue, 8 Nov 2005 11:29:30 +0100 Package: bash Version: 2.05b-26 Followup-For: Bug #313514 Hi, this bug hit me today, too, when I wanted to delete filenames with newlines. Completion for mv, rm and ls (haven't tested others) show this bug, even if you use M-* (insert-completions). $ rm fo<M-*> results even to: $ rm bar foo It does not fail on e. g. echo: $ echo fo<tab> $ echo 'foo bar' (M-* works here correctly, too.) Interesting point is, that it _only_ seems to break on newlines. Doing $ touch "$(echo -e 'evil filename with\nan LF and other special chars ($bla) : , "')" $ rm ev<M-*> results in: $ rm an\ LF\ and\ other\ special\ chars\ \(\$bla\)\ \:\ \,\ \" evil\ filename\ with As a little workaround one can either write $ echo rm ev<tab> or $ xrm ev<tab> then using C-a or Home and deleting "echo " or "x" before execution. The last one maybe only works if there isn't a xrm file/function/alias or something. And oh, I just found out, you can even do $ rm ev<M-/> (M-/ is by default bound to complete-filename. M-x BTW can be entered as ESC x, too.) Greetings, Mike ---------------------------------------------------------------------- You can respond by visiting: http://alioth.debian.org/tracker/?func=detail&atid=413095&aid=311399&group_id=100114 _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel