[zypp-devel] Re: [zypp-commit] r9893 - in /trunk/zypper: doc/zypper.8 src/zypper-main.cc src/zypper-main.h src/zypper-utils.cc src/zypper.cc src/zypper.h
Hi Jano, On Tue, 29 Apr 2008, jkupec@svn.opensuse.org wrote:
+ line_read = ::readline ("zypper> ");
One remark that came to my mind while reading the patch: gdb is another program that uses readline to handle its input, resembling shell input. It uses this as prompt: (gdb) <CURSOR> (i.e. "(gdb) ", including the separating space). I kind of like this prompt because it doesn't use any character I'm used to seeing in normal shell prompts (I'm aware of people changing their $PS1, but they often don't use parentheses). In particular the '>' character is sometimes used to introduce the normal shell command prompt, so 'zypper> ' "feels" like a shell prompt when I'm on a machine called zypper. That's partly by design of course, after all it _is_ a prompt; it's just that you can't give your normal shell command into it (not even things like "$((1 + 2))") so it seems sensible to differentiate between them also by slight visual differences. I know that this certainly makes bugzilla reports easier to read when the commenter copy&pastes something from the terminal which includes such prompts; it's clearly distinguishable from shell. So perhaps it would be a nice convention to make all prompts from programs (in comparison to a shell) read "(programname) ". zypper could be used to hammer such convention into users brains :-) What do you think? Ciao, Michael. -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
On Wed, Apr 30, 2008 at 01:52:30AM +0200, Michael Matz wrote:
Hi Jano,
On Tue, 29 Apr 2008, jkupec@svn.opensuse.org wrote:
+ line_read = ::readline ("zypper> "); So perhaps it would be a nice convention to make all prompts from programs (in comparison to a shell) read "(programname) ". zypper could be used to hammer such convention into users brains :-)
When I first coded the prompt, I too wanted it to be different from my shell prompt, which uses $ or #. But yes, "(programname) " sounds good. -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org
participants (2)
-
Martin Vidner
-
Michael Matz