From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3098 invoked by alias); 8 Dec 2012 11:43:40 -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: 17463 Received: (qmail 16174 invoked from network); 8 Dec 2012 11:43:38 -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.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.215.43 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=xDIlZXhHHH9RrrVw3VbfJ1tw2vQVbhVQCB0Vm11PNN4=; b=sPwpu7SojNguQNo+dMhAPcyKFLgfaIFrox3Lz5RT17nh2a1sF1vUirhsiMnOUEX90f opNL9AgXY87dvXTgnVj0RRgxYe22B8Os02TQ/ijf5Pxtr3HPCTTbZ1Hc41XLjjb8hK1p IRisGiKPhHNt2ri96wLm+4cb8dG/aFZS+vSIVcteyUT0Bso3NnitXQRdVsLJRzAwYnCr 7E30zXpvJGWrUyAenrqff+4Hw4o3Glufw+jUUUqITQGzHyQ1n0Rn4Z74BRcvbVU5OxU+ VF/8NkHz3IUNcULO6J99DtXHZW86fE69weVJS42amCLmzzlxtb7M03lEeEEkJBU/rxEp HojQ== MIME-Version: 1.0 From: shawn wilson Date: Sat, 8 Dec 2012 06:15:15 -0500 Message-ID: Subject: script help To: Zsh Users Content-Type: text/plain; charset=UTF-8 this is in my .zshrc file and it fails to execute $cmd with: vim:45: no such file or directory: /usr/local/bin/vim --servername SWILSON ######## zshrc part: # make vim use or initialize a session with a new tab unless... vim () { local cmd local servername local remote local username=$(echo $USER | tr "[:lower:]" "[:upper:]") local opt_ex="^-" while [ $# -gt 0 ] ; do case "$1" in --servername) if [[ $1 =~ $opt_ex ]] ; then echo "Servername option without a parameter. Doing nothing." return else servername="$2" return fi ;; --remote*) if [ -z $remote ] ; then remote=$1 else # I'll deal with this properly if it is reasonable to take multiple --remote* things echo "Should not call two remote options at once. Doing nothing." return fi ;; *) misc="$misc $1" ;; esac shift done cmd="/usr/local/bin/vim" if [ ! -z $servername ] ; then cmd="$cmd --servername $servername" else cmd="$cmd --servername $username" fi if [ -z $misc ] && [ -z $remote ] ; then $cmd return fi if [ ! -z $remote ] ; then cmd="$cmd $remote $misc" else cmd="$cmd --remote-tab $misc" fi $cmd return }