Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [BUG] umount mountpoint completion
- X-seq: zsh-workers 40778
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Ferdinand Thiessen <f.thiessen@xxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: [BUG] umount mountpoint completion
- Date: Mon, 6 Mar 2017 15:10:30 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=T2qMID2oTh8MPbEaPuKfvmuLg8ZwRSuenMP9NsLZ6jQ=; b=RR9hf3dpjBWkd0EiMCzjnxCssV+ti+lv4Ty06YQ5a0NWkP3DSFaE4BVRbpXNcMV9wP tIggXh0Ybba4bOQI9ANvjGmv3MBZkUQXuJI8S3INALbcj2GpAdD8H1/X1lPMmmWuFvl4 idoTRi9NnJanZ9093GOyYmvj+cXH2Nt48Mb0ahUesWwpAhdvXJUZaKi0bWk7ycCCHbi+ ODhMmCCMethjo/x9y/fG7pOaozgN7qzJccU/7NQSYdzrXr/ThwfUOpOQ16r+dJc9kBKW v1uGFVUk1CkQGj39u7LBYxcDAWpcNZ7lXPv7CWbN5ZS4vL3rShB9H/GvwIPtIVZfS+MA +4CA==
- In-reply-to: <39bf9cbd-8082-3fd6-54f9-8d1a3f498095@gmx.de>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <8b983c55-f23e-2829-0131-c9970ec9b46b@gmx.de> <170305200130.ZM31787@torch.brasslantern.com> <39bf9cbd-8082-3fd6-54f9-8d1a3f498095@gmx.de>
So ... there's a comment in the old _mount discussing what goes on here,
which was removed (and the code partially broken) by workers/33963.
The comment used to say:
- # "Well, dear, the clever people who wrote Linux decided that some
- # funny characters that might confuse programmes looking at the names
- # would be encoded as octal escapes, like for example \040 for space.
- # The clever people who wrote zsh decided that nothing would
- # ever be quite as simple as it should be, so to substitute octal
- # escapes everywhere in a string, even though the shell understands
- # them natively in print escapes, needs some hackery where you match
- # the octal number using the numeric closure syntax introduced after
- # 4.3.4, then reinput the number in a standard math mode format as 8#OOO,
- # and turn that into a character using the (#) parameter flag."
The fancy substitution that cleaned up this mess was then replaced by a
simpler one that works NEARLY all the time; except it breaks when the
aforementioned \040 for space is followed by ANOTHER digit. In that
case the simplfied substitution treats (in Ferdinand's example) \0400
as a single octal number and turns it into $'\C-@' instead of " 0".
So perhaps 33963 needs to be reverted, and something less flippant
added to the comment to explain that the reason for bouncing back and
forth between numeric closure syntax and math mode format is to be sure
that EXACTLY THREE characters are interpreted as an octal number here.
However, one question remains. Ferdinand, in your original message on
this thread you said:
} > % sudo umount "/tmp/a\ 0"
}
} Which is of course invalid.
Could you please explain why you consider this to be invalid? Because if
all we do is revert 33963, the above is what you're going to get again,
and I don't immediately see what's wrong with it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author