Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh-4.04 and w3m browser
- X-seq: zsh-workers 17593
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx (Zsh hackers list)
- Subject: Re: zsh-4.04 and w3m browser
- Date: Wed, 28 Aug 2002 11:16:02 -0700
- In-reply-to: <24871.1030557411@xxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <24871.1030557411@xxxxxxx>
On Aug 28, 6:56pm, Peter Stephenson wrote:
> Subject: Re: zsh-4.04 and w3m browser
> Wayne Davison wrote:
> >
> > If there were some way to run a shell function after the user hits
> > return but before the line is parsed, it would be possible for the
> > function to add single quotes
>
> I've never dared add this because it's too easy to get the shell into a
> state where it will never work again.
What about a command-not-found hook of some kind? E.g. any time you get
command-not-found, run function X with the command line as $@. The only
rule would be that if you get command-not-found again while inside the
command-not-found hook, the hook is not called again.
Then one could do something like
realpath=($path)
path=()
setopt noglob
function command_not_found_hook {
local -ah path
path=($realpath)
setopt localoptions glob
urlglobber "$@"
}
Messages sorted by:
Reverse Date,
Date,
Thread,
Author