From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21573 invoked by alias); 5 Feb 2015 16:18:30 -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: 19822 Received: (qmail 24826 invoked from network); 5 Feb 2015 16:18:26 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,HTML_MESSAGE, RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=4IIYgzmrww3Ax4QOKVuRjmsGKJJ/Jr3zLJHCbmO0m8g=; b=EQ503TGipZlr51nQ22jAxrlabaIDLk7POVTKUTf8ZX4WAvQJiNoZciyU2t0Gmoki2L 68Hsvr7Rk3u8FU54AU0IJKv6jhYSleWIj6J7r5fAqaXtEQ73UVFNq3ZUZe6UzHcYaBRo D+zCTsRMfFjSq6+JAXIE2I1TeuCbiJcjAgW5csL1vLnLkDhQdP4hfJJUf3KOAC5IMSNl RUNI2pczZyBIgoCBS72+6lM4KldbMZrxfPveFD127dXqPH3A55Yk7sTMjeZr+cB2lh7x sKWR6jk8CYEP/SMdGWuPLhCsLT//05aVJo2Z18RvxPtbU9T6S2YWgu0h2xoZsHR8lZl/ hwfg== X-Gm-Message-State: ALoCoQncgaQxkj8y1HfvUwlLsTf9zNcsGzrZ0fC/SOWjQ1ZVo4EijSXwcB0xxLlLS3fv0S0zZsID MIME-Version: 1.0 X-Received: by 10.112.158.199 with SMTP id ww7mr1013614lbb.104.1423153099953; Thu, 05 Feb 2015 08:18:19 -0800 (PST) In-Reply-To: <54D39290.9020702@gmail.com> References: <54D39290.9020702@gmail.com> Date: Thu, 5 Feb 2015 08:18:19 -0800 Message-ID: Subject: Re: PATH variable case-insensitive? From: Kurtis Rader To: Koch Cc: Zsh Users Content-Type: multipart/alternative; boundary=001a11c33aa8fbecfe050e59a68e --001a11c33aa8fbecfe050e59a68e Content-Type: text/plain; charset=UTF-8 That is not a bug. It's a feature. See the discussion of "typeset -T" in "man zshbuiltins". The lower-case version of PATH is an array parameter bound to the scalar upper-case parameter. The CDPATH parameter has a similar binding. You can create your own with "typeset -T". Personally, I like the feature as it allows for more readable and easier to maintain dot files. For example, in my $HOME/.zshenv I have _PATH="$PATH" # save the original path for diagnostic purposes typeset -U path # note that -T is implicit for PATH/path path=( ${HOME}/bin ${HOME}/sbin ${HOME}/symlinks /usr/local/bin /usr/local/go/bin /usr/local/sbin /usr/bin /usr/sbin /bin /sbin /opt/X11/bin ) typeset -U cdpath # note that -T is implicit for CDPATH/cdpath cdpath=( ${HOME}/projects/personal ${HOME}/projects/3rd_party . ) On Thu, Feb 5, 2015 at 7:56 AM, Koch wrote: > Using zsh 5.0.2 (x86_64-pc-linux-gnu) with the following file contents in > ./test.zsh: > > PATH=bar > path=omg > echo $PATH > > and running zsh ./test.zsh outputs: > omg > > Is this a bug? It's certainly not my intention to have this meaning > attached to this program, since it goes against POSIX. > > -- Kurtis Rader Caretaker of the exceptional canines Junior and Hank --001a11c33aa8fbecfe050e59a68e--