From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id JAA19260 for ; Thu, 3 Oct 1996 09:37:23 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id TAA06569; Wed, 2 Oct 1996 19:24:35 -0400 (EDT) Resent-Date: Wed, 2 Oct 1996 19:24:35 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199610022318.BAA01112@hzoli.ppp.cs.elte.hu> Subject: Re: Prompt escape sequences. To: Louis.Granboulan@ens.fr (Louis Granboulan) Date: Thu, 3 Oct 1996 01:18:47 +0200 (MET DST) Cc: zsh-workers@math.gatech.edu In-Reply-To: <199610011711.TAA05214@pleurote.ens.fr> from Louis Granboulan at "Oct 1, 96 07:11:33 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"i1de53.0.Wc1.oclKo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2188 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > I wanted to add a new escape sequence %${varname} to print the > content of a variable. Looking at putpromptchar, I found some > bugs... Thank you for the bugfix. But I really do not see the usefullness of the %${varnane} feature. The same can be achieved using the promptsubst option. The %${...} syntax can create confusion since it is identical to the parameter expansion syntax. > print -P %-%7- > outputs '%-%-' instead of '%-%7-'. > I did not correct this behaviour. > It may be easy to do. I do not think it is a bug. %% should always be used to put a % into the prompt since future versions may introduce new % sequences. After looking at this patch I thought that a new point to the Util/zsh-development-guide might be useful. I think that this should go under Etc. Richard, why did you put it into Util when you created it? 6) Please try not using lines longer than 79 characters. The coding style is Kernighan and Ritchie with 4 characters indentations. This means that the opening brace is the last character in the line of the if/while/for/do statement and the closing brace has its own line: if (foo) { do that } Put only one command in a line (this also means that the body of an if/while/for/do statement has its own line with 4 characters indentation even if there are no braces). Do not use space between the function name and the opening parenthesis. Use space after if/for/while. Use space after type casts. Do not use (unsigned char) casts since some compilers do not handle them properly. Use the provided STOUC(X) macro instead. If you use emacs 19.30 or newer you can put the following line to your ~/.emacs file to make these formatting rules the default: (add-hook 'c-mode-common-hook (function (lambda () (c-set-style "BSD")))) A global function declaration must look like this: /**/ int foo(char *s, char **p) { function body } There must be an empty line, a line with /**/, a line with the type of the function and finally the name of the function with typed arguments. These lines should not be indented. This rule is a must because the script generating function prototypes and the ansi2knr program depends on this format. Zoltan