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

Re: Bug: Ubuntu apt-get install package-*

On Nov 14,  5:25pm, Oliver Kiddle wrote:
} > torch% echo bl?or*      
} > zsh: correct 'bl?or*' to 'bl\?or\*' [nyae]? y
} > bl?or*
} An interesting idea. Given that correction happens before globbing
} I can't think of any particularly sane criteria for when to trigger
} this correction.

The less-horrible implementation would be to do this at the globbing
step where CSH_NULL_GLOB is applied.  I just didn't want to go to the
effort of hooking up an entirely new spckword()-alike.

} The "horrible implementation" seems to take anything
} two characters in length or longer and ~ is not regarded as a pattern
} character. So haswilds must be returning false for just '*' or '?' which
} seems odd.

Yes, spckword() is doing funny things to avoid giving spelling errors on
~username etc.  I didn't take very much care to avoid any of that when I
threw that example together.

} So as it is, it would just be irritating because it would offer a
} correction virtually every time you attempt to use a glob.

The NO_NOMATCH option would disable this, as would NULL_GLOB.

} If you defer
} the correction to when a glob fails then it could be irritating if a
} glob gets used in a loop

Yes, there would have to be a flag at some level that would indicate
whether the user had already accepted NO_NOMATCH behavior, so you'd
only be asked once per top-level prompt.

} And without making this the default, it probably won't help the situation
} much for bash exiles expecting nonomatch behaviour.

Yes, it would have to be the default when NOMATCH.

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