Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Reading difficult directory name correctly:



On Thu, Dec 10, 2020 at 2:23 PM Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
>
> Right you are there's a file:
>
>      Sky above 49°30'N 123°30'W at Sat 2020 Oct 3 5:35.html
>
> But shouldn't it  go into into it's selection mode?  I keep pressing tab
> until I get the completion I want?

If I make the directory and file you mentioned, then press TAB twice,
I get this (pardon likely gmail line wrapping):

ubuntu% rm -f 19:58:13\ Sky\ above\ 49°30\'N\ 123°30\'W\ at\ Sat\
2020\ Oct\ 3\ 5:35
file
19:58:13\ Sky\ above\ 49°30\'N\ 123°30\'W\ at\ Sat\ 2020\ Oct\ 3\ 5:35_files/
19:58:13\ Sky\ above\ 49°30\'N\ 123°30\'W\ at\ Sat\ 2020\ Oct\ 3\ 5:35.html

(That's with zsh -f with compinit -D plus zstyle '*' format %d)

> Mind ... the command is "
> rm -r " thus expecting a directory and the other item is a file.

I don't think completion for "rm -f" introduces any expectation of directory.

> >
> > Running _complete_debug with ctrl-x? may provide some insight here.
> >
> Pardon Bart, exactly how do I do that?

Instead of pressing TAB, hold down the ctrl key, type x, then release
that, hold down shift, and type question mark.

A file will be written with a backtrace of what the completion system
did.  An entry is made in the shell history providing the name of the
file.




Messages sorted by: Reverse Date, Date, Thread, Author