From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13044 invoked by alias); 11 Jan 2012 23:48:34 -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: 16732 Received: (qmail 6182 invoked from network); 11 Jan 2012 23:48:33 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <120111154814.ZM16912@torch.brasslantern.com> Date: Wed, 11 Jan 2012 15:48:14 -0800 In-reply-to: <4F0E04D7.9090207@mandic.com.br> Comments: In reply to "Daniel Serodio (lists)" "Re: zkbd on OS X" (Jan 11, 7:53pm) References: <4F01FE34.1020308@mandic.com.br> <20120103101643.GA1879@redoubt.spodhuis.org> <4F02F74F.1050004@mandic.com.br> <120104200225.ZM13518@torch.brasslantern.com> <4F0E04D7.9090207@mandic.com.br> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: zkbd on OS X MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 11, 7:53pm, Daniel Serodio (lists) wrote: } } Bart Schaefer wrote: } > I'd probably go with one of: } > } > local termID=${${DISPLAY%%*/*}:-$VENDOR-$OSTYPE} } > } > or } > } > local termID=${${DISPLAY:t}:-$VENDOR-$OSTYPE} } > } > depending on whether it's better to ignore DISPLAY when it contains a } > slash, or to use the part of the file name that corresponds to the X11 } > display name. Opinions? [...] } > What circumstances are you dealing with where $DISPLAY changes without } > some other part of the environment also changing? } My actual problems are: } } 1) I use Subversion to store my config files, which I share between my } home and work computers. $DISPLAY is different between them, but I'd } like the keymappings to be the same. I do something similar and deal with this kind of thing in this way: (1) _Don't_ source-control $HOME/.z* files; instead have a $ZDOTDIR that is source controlled (I use $HOME/.zsh/) and have $HOME/.zshenv do nothing but export ZDOTDIR and then "source $ZDOTDIR/.zshenv" (2) Have a subdirectory $ZDOTDIR/local/ which contains symlinks from standard names for assorted files (such as zkbd bindings) to the actual files used for each host (this could be somewhere outside ZDOTDIR if it creates source control conflicts) (3) Create a little setup script that populates local/ the first time the ZDOTDIR source tree is checked out on a new host (also creates the $HOME/.zshenv in my case) (4) $ZDOTDIR/.zshrc et al. always "source $ZDOTDIR/local/something" for any config that isn't completely portable. } 2) When zkbd finishes executing (eg. because I've changed terminal } emulators), I get an error (which zkbd neither tries to prevent nor test } for) See "Opinions?" question above.