From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25902 invoked by alias); 13 Aug 2011 10:49:00 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16211 Received: (qmail 6518 invoked from network); 13 Aug 2011 10:48:59 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.161.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version:content-type:content-transfer-encoding; bh=jcD++xQEG9z6+YrqyTMQJAJ6dE3eABD8p4m/6JU4eh8=; b=RNl4JgSGiAav3sND4RTM732JidPYHqmilR0nK3z208dN/kg6UVl7e3cz+jFdCGRyuT F/1uHN/bDpf/5R/7YRSsMyKVpkBVznIQR3vHRFx5b53kb4JNMG6L2qmABlS3tvcOQlIx kf11aq+LawdWfPnuSoYmaMKIeOfDVAspoyyDM= From: =?utf-8?B?xaB0xJtww6FuIE7Em21lYw==?= To: Micah Elliott Cc: Bart Schaefer , zsh-users@zsh.org Subject: Re: Idiom for booleans In-Reply-To: (Micah Elliott's message of "Fri, 12 Aug 2011 22:26:53 -0700") References: <110812200942.ZM8287@torch.brasslantern.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) Date: Sat, 13 Aug 2011 12:37:26 +0200 Message-ID: <87ei0pa97d.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On Sat, 13 Aug 2011 07:26:53 +0200 Micah Elliott wrote: > So the buggy (or just bash-aware) python utility isn't going to work > with zsh. FWIW, I've been using this (put in my .zshrc), and never had any problems (the (()) thing works as expected): # from /etc/bash.bashrc, handle -> handler if [ -x /usr/lib/command-not-found ]; then function command_not_found_handler { # check because c-n-f could've been removed in the meantime if [ -x /usr/lib/command-not-found ]; then /usr/bin/python /usr/lib/command-not-found -- $1 return $? else return 127 fi } fi --=20 =C5=A0t=C4=9Bp=C3=A1n