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

Re: Remote scp completion that can handle spaces etc. in pathnames



Oliver Kiddle <okiddle@xxxxxxxxxxx> writes:

> The completion for ssh uses ls -F on the remote machine to get the files
> and then takes trailing *, =, |, / and @ characters to be the characters

Ah, so it does indeed.  I wonder if listing could be done in some
other, more robust way.  The availability of programs on the remote
machine obviously limits the possible ways...  Perhaps find could
be used?

> added by ls -F to indicate the type of the file. I don't tend to have
> file names ending in those characters and find it useful that it does
> this. The ssh completion should perhaps honour the list_types style but

I don't usually have file names ending in those characters either
(someone else whose files I need to copy might have, though) and
one of the reasons I use zsh is that in general it handles even the
corner cases well unlike so many other programs.  Programmers who
think "oh well, no one should put spaces to filenames anyway" and
do not handle the filenames allowed by the relevant standards are
the cause to problems like Y2k.  Of course, in this case zsh is at
the mercy of programs that make it hard to be robust, so it is
understandable if it cannot be done (I guess it would be nice if it
was documented somewhere, however).

-- 
Hannu



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