From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: Louis.Granboulan@ens.fr (Louis Granboulan)
Cc: zsh-workers@math.gatech.edu
Subject: Re: Prompt escape sequences.
Date: Thu, 3 Oct 1996 01:18:47 +0200 (MET DST) [thread overview]
Message-ID: <199610022318.BAA01112@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <199610011711.TAA05214@pleurote.ens.fr> from Louis Granboulan at "Oct 1, 96 07:11:33 pm"
> 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
next prev parent reply other threads:[~1996-10-02 23:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-01 17:11 Louis Granboulan
1996-10-02 23:18 ` Zoltan Hidvegi [this message]
1996-10-03 6:09 ` Richard Coleman
[not found] <20071008034223.GA789@primenet.com.au>
[not found] ` <071007210217.ZM24374@torch.brasslantern.com>
[not found] ` <20071008042759.GA2413@primenet.com.au>
2007-10-08 15:44 ` PROMPT " Bart Schaefer
2007-10-09 3:23 ` Geoff Wing
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=199610022318.BAA01112@hzoli.ppp.cs.elte.hu \
--to=hzoli@cs.elte.hu \
--cc=Louis.Granboulan@ens.fr \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).