From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7737 invoked by alias); 4 Nov 2014 09:42:36 -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: 19333 Received: (qmail 15082 invoked from network); 4 Nov 2014 09:42:30 -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,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 :content-transfer-encoding; bh=N+FbluUhJiEddaIvlPE0Al7cpyh8z22cPEXYNtE5Imc=; b=Pzd1fKqLYhao6VbdPNgaHYt1RkLVh+e79Ifb7OSuchTwbZsFXyOvuApTggF/FC95dP oC+88VvSk2t/FvNCx7UqiIZo0xPee/QPMAqClWZSKCTnyA+NmBgJHWSvo+pvsV5B8g5A ctRGPHDaph9lLlUmKZ0Jj5VJcUOuh7TIPRDRTstiRp25OGka48rsHC1NJ404LCxFECZK 9x3oyGybHg/Eu0hJQLMa84ic33vwc7Hf/N6g5eIGlNR1amZBs//1ecmKMOgFUToDTZhv 2r4LWJp7TmU2BNSX9aT9H2MZhDd6+JAlsFzp6goLBo4rCgXGR2NR8Nlx4q8S58vbMCFd dmVw== X-Gm-Message-State: ALoCoQk1vT/K3WnwCqna+W4mIAgGdoo4Y2sJcNCieSuLMJ+9xQNH4+fEhkLXHAd705WcxzGVBVpt MIME-Version: 1.0 X-Received: by 10.107.138.26 with SMTP id m26mr7616269iod.64.1415094144504; Tue, 04 Nov 2014 01:42:24 -0800 (PST) X-Originating-IP: [143.89.97.75] In-Reply-To: <141103233651.ZM32506@torch.brasslantern.com> References: <141103194346.ZM32278@torch.brasslantern.com> <141103233651.ZM32506@torch.brasslantern.com> Date: Tue, 4 Nov 2014 17:42:24 +0800 Message-ID: Subject: Re: How to stop dir expansion in the prompt? From: Shiyao Ma To: Bart Schaefer Cc: zsh-users@zsh.org Content-Type: text/plain; charset=ISO-2022-JP Content-Transfer-Encoding: 7bit 2014-11-04 15:36 GMT+08:00 Bart Schaefer : > /#$HOME/ means the pattern has to match at the start of the string. > Are you sure the value of $vcs_info_msg_0_ starts with the directory > name? When outside a vcs directory, `echo $vcs_info_msg_0_` gives %d, which is the same string in zstyle nvcsformat. So in this scenario, it would be better to let it expand to the actual full path so that I can do the replacement. Any idea on that? (My last idea is to insert a function into the prompt, but it's ugly). >Also, why is the %% in the inner expansion? (I guess it was in > your original example too, but it's extraneous if there's nothing > between it and the closing brace.) Yup. One minor question. No matter how many % I write, like this one:echo ${vcs_info_msg_0_%%%%%}, it's the same as echo ${vcs_info_msg_0_}. So what's % here? Again. Thanks for your help. -- 吾輩は猫である。ホームーページはhttp://introo.me。