From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2451 invoked from network); 28 Aug 2002 18:16:36 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Aug 2002 18:16:36 -0000 Received: (qmail 28221 invoked by alias); 28 Aug 2002 18:16:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17593 Received: (qmail 28207 invoked from network); 28 Aug 2002 18:16:30 -0000 From: "Bart Schaefer" Message-Id: <020828111602.ZM7907@candle.brasslantern.com> Date: Wed, 28 Aug 2002 11:16:02 -0700 In-Reply-To: <24871.1030557411@csr.com> Comments: In reply to Peter Stephenson "Re: zsh-4.04 and w3m browser" (Aug 28, 6:56pm) References: <24871.1030557411@csr.com> X-Mailer: Z-Mail Lite (5.0.0 30July97) To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: zsh-4.04 and w3m browser MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 "$@" }