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

Re: compset -q oddities



On Sep 14,  6:12am, Daniel Shahaf wrote:
} Subject: Re: compset -q oddities
}
} Why should "f \\\~\\\~\\\~<TAB>" fail?
} 
} Essentially, 'compset -q' "looks through" one level of quoting, and
} whatever is happening in the "ssh \git.code<TAB>" case looks through the
} second level of quoting.
} 
} Makes sense?

Yes, except that in \g the backslash really is redundant, whereas with
\~ the intent might be to compare a literal tilde to an expansion tilde
(which is different still from a globbing tilde).

} Bart Schaefer wrote on Tue, Sep 13, 2016 at 22:20:29 -0700:
} > Also now that I think of it, there's only one match with that compadd,
} > so it should have appended a trailing space and the second tab should
} > have been in an entirely new (also empty) word.
} 
} That's a bit tricky.  I think it should append an escaped space, e.g.,
} "sh -c touc<TAB>" should append <h> <Backslash> <Space>.

No, that's *exactly* the kind of DWIM-ing that we abandoned.  If the user
wants the space quoted, then he should start with "sh -c 'touc<TAB>".



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