From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13044 invoked from network); 5 Apr 1997 07:51:08 -0000 Received: from euclid.skiles.gatech.edu (list@130.207.146.50) by coral.primenet.com.au with SMTP; 5 Apr 1997 07:51:08 -0000 Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id CAA09711; Sat, 5 Apr 1997 02:33:52 -0500 (EST) Resent-Date: Sat, 5 Apr 1997 02:33:08 -0500 (EST) From: gwing@primenet.com.au Message-ID: <19970405073602.13018.qmail@primenet.com.au> Subject: Re: HISTSIZE and prompt In-Reply-To: from "Zhong, Kaixiang" at "Apr 4, 97 10:53:07 am" To: kzhong@onewave.com (Zhong Kaixiang) Date: Sat, 5 Apr 1997 17:36:01 +1000 (EST) Cc: zsh-users@math.gatech.edu X-Mailer: ELM [version 2.4ME+ PL31 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"qo0H71.0.bM2.q0WHp"@euclid> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/789 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zhong, Kaixiang wrote: :In .zshrc, I set HISTSIZE to 100, and it does store previous 100 :commands. :However, when I type history, it only shows last 16 commands. :Is there any other variables I should set? >>From the manual: history Same as fc -l fc .... [ first [last ] ] ..... If first is not specified, it will be set to -1 (the most recent event), or to -16 if the -l flag is given ..... :Another thing I notices is: :if I set :1) 'setopt cdablevars ' to enable that the argument of cd can be an env :variable, :2) prompt='%~>' :3) mydir=/home/kzhong/dir/mydir :after I 'cd ~mybin', my prompt looks like "~mydir>" :but if I change 3) to :3) dir=/home/kzhong/dir/mydir :and after I 'cd ~dir', my prompt looks like "~/dir/mydir" instead of :"~dir". :How can I make it looks like "~dir"? I think there used to be (and may still be) something in the distribution which was like this but with some other function name: expanddir() { eval $1=$2; : ~$1 } Then you would do: % expanddir mydir /home/kzhong/dir/mydir Of course, you could put some error checking in the function to check for the right number of arguments, existance of $2 (and that it's a directory), etc. >>From the manual: : [ arg ... ] This command only expands parameters. A zero exit code is returned. Once you have used ``mydir'' as a named directory, ie. as ~mydir , it will be used in your prompt as a named directory. -- Geoff Wing [mason@primenet.com.au] Technical Manager Phone : +61-3-9818 2977 PrimeNet - Internet Consultancy Facsimile: +61-3-9819 3788 Web : Mobile : 0412 162 441