zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: remove work of art in _umount
@ 2014-12-14 15:18 Mikael Magnusson
  2014-12-14 17:16 ` Ray Andrews
  0 siblings, 1 reply; 7+ messages in thread
From: Mikael Magnusson @ 2014-12-14 15:18 UTC (permalink / raw)
  To: zsh-workers

dpath_tmp could actually also have \040 in it, so also handle
that. (for example if you bindmount /tmp/foo\ bar to /tmp/foo\ foo,
both would). dev_tmp hopefully never will, but why not handle it anyway
(if it should even be completed at this point at all).

---

This doesn't in any way affect Silas' issue, but I spotted it while
looking at the completer.

---
 Completion/Unix/Command/_mount | 24 +++---------------------
 1 file changed, 3 insertions(+), 21 deletions(-)

diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount
index 0428222..a3b58bb 100644
--- a/Completion/Unix/Command/_mount
+++ b/Completion/Unix/Command/_mount
@@ -959,27 +959,9 @@ udevordir)
   esac
 
   local MATCH MBEGIN MEND
-  # "Mummy, why is mount point matching full of squiggles?"
-  #
-  # "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."
-  #
-  # "Mummy, why is nothing ever quite as simple as it should be?"
-  #
-  # "Well, dear, if it was then the clever people who write programmes would
-  # have been replaced by intelligent monkeys and then they'd be out
-  # of working roaming the streets, and we wouldn't want that, would we?"
-  mp_tmp=("${(@q)mp_tmp//(#m)\\[0-7](#c3)/${(#)$(( 8#${MATCH[2,-1]} ))}}")
-  dpath_tmp=( "${(@Mq)dev_tmp:#/*}" )
-  dev_tmp=( "${(@q)dev_tmp:#/*}" )
+  mp_tmp=("${(@qg::)mp_tmp}")
+  dpath_tmp=( "${(@Mqg::)dev_tmp:#/*}" )
+  dev_tmp=( "${(@qg::)dev_tmp:#/*}" )
 
   _alternative \
     'device-labels:device label:compadd -a dev_tmp' \
-- 
2.2.0.GIT


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: remove work of art in _umount
  2014-12-14 15:18 PATCH: remove work of art in _umount Mikael Magnusson
@ 2014-12-14 17:16 ` Ray Andrews
  2014-12-14 18:44   ` Mikael Magnusson
  0 siblings, 1 reply; 7+ messages in thread
From: Ray Andrews @ 2014-12-14 17:16 UTC (permalink / raw)
  To: zsh-workers

On 12/14/2014 07:18 AM, Mikael Magnusson wrote:
>   
>     local MATCH MBEGIN MEND
> -  # "Mummy, why is mount point matching full of squiggles?"
> -  #
> -  # "Well, dear, the clever people who wrote Linux decided that some
> -  # funny characters that might confuse programmes looking at the names
...

Who wrote that, and do they accept disciples or have they retreated to a 
cave
in the Himalayas?  You aren't really going to delete that from the 
scrolls? Surely
it is Received Text? Anyway, it's good to know I ain't the only person 
who thinks
like that.  Rage against the Machine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: remove work of art in _umount
  2014-12-14 17:16 ` Ray Andrews
@ 2014-12-14 18:44   ` Mikael Magnusson
  2014-12-14 18:56     ` Bart Schaefer
  2014-12-14 20:07     ` Ray Andrews
  0 siblings, 2 replies; 7+ messages in thread
From: Mikael Magnusson @ 2014-12-14 18:44 UTC (permalink / raw)
  To: Ray Andrews; +Cc: zsh workers

Please don't send useless messages like this to -workers.

On Sun, Dec 14, 2014 at 6:16 PM, Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> Who wrote that, and do they accept disciples or have they retreated to a
> cave
> in the Himalayas?  You aren't really going to delete that from the scrolls?
> Surely
> it is Received Text? Anyway, it's good to know I ain't the only person who
> thinks
> like that.  Rage against the Machine.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: remove work of art in _umount
  2014-12-14 18:44   ` Mikael Magnusson
@ 2014-12-14 18:56     ` Bart Schaefer
  2014-12-14 20:20       ` Ray Andrews
  2014-12-14 20:07     ` Ray Andrews
  1 sibling, 1 reply; 7+ messages in thread
From: Bart Schaefer @ 2014-12-14 18:56 UTC (permalink / raw)
  To: Mikael Magnusson, Ray Andrews; +Cc: zsh workers

On Dec 14,  7:44pm, Mikael Magnusson wrote:
}
} Please don't send useless messages like this to -workers.

I wouldn't get particularly worked up about it.  A little levity is not
unwelcome.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: remove work of art in _umount
  2014-12-14 18:44   ` Mikael Magnusson
  2014-12-14 18:56     ` Bart Schaefer
@ 2014-12-14 20:07     ` Ray Andrews
  2014-12-14 21:55       ` Mikael Magnusson
  1 sibling, 1 reply; 7+ messages in thread
From: Ray Andrews @ 2014-12-14 20:07 UTC (permalink / raw)
  To: zsh-workers

On 12/14/2014 10:44 AM, Mikael Magnusson wrote:
> Please don't send useless messages like this to -workers.
Pardon, but it would be very useful to me to know who wrote that.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: remove work of art in _umount
  2014-12-14 18:56     ` Bart Schaefer
@ 2014-12-14 20:20       ` Ray Andrews
  0 siblings, 0 replies; 7+ messages in thread
From: Ray Andrews @ 2014-12-14 20:20 UTC (permalink / raw)
  Cc: zsh workers

On 12/14/2014 10:56 AM, Bart Schaefer wrote:
> On Dec 14,  7:44pm, Mikael Magnusson wrote:
> }
> } Please don't send useless messages like this to -workers.
>
> I wouldn't get particularly worked up about it.  A little levity is not
> unwelcome.
Yeah, I try to have a bit of fun, but really, I do want to know who 
wrote that
because it shows me that I'm not the only guy who finds things more 
difficult
than they might need to be.  Geniuses can get so wrapped up in their genius
that they forget that what they create should be usable by ordinary folks.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: PATCH: remove work of art in _umount
  2014-12-14 20:07     ` Ray Andrews
@ 2014-12-14 21:55       ` Mikael Magnusson
  0 siblings, 0 replies; 7+ messages in thread
From: Mikael Magnusson @ 2014-12-14 21:55 UTC (permalink / raw)
  To: Ray Andrews; +Cc: zsh workers

On Sun, Dec 14, 2014 at 9:07 PM, Ray Andrews <rayandrews@eastlink.ca> wrote:
> On 12/14/2014 10:44 AM, Mikael Magnusson wrote:
>>
>> Please don't send useless messages like this to -workers.
>
> Pardon, but it would be very useful to me to know who wrote that.

So in these cases, git blame comes in very handy (or git gui blame),
just run git gui blame **/_mount, scroll down to the line and click
it, and it'll tell you the last commit that touched the line. It also
lets you blame the parent of that commit so you can see older changes
easily.

9382be33479f
+2008-01-19  Peter Stephenson  <p.w.stephenson@ntlworld.com>
+
+    * users/12461: Completion/Unix/Command/_mount: mount points
+    weren't completed properly for umount.


-- 
Mikael Magnusson


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2014-12-14 21:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-14 15:18 PATCH: remove work of art in _umount Mikael Magnusson
2014-12-14 17:16 ` Ray Andrews
2014-12-14 18:44   ` Mikael Magnusson
2014-12-14 18:56     ` Bart Schaefer
2014-12-14 20:20       ` Ray Andrews
2014-12-14 20:07     ` Ray Andrews
2014-12-14 21:55       ` Mikael Magnusson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).