[haiku-commits] Re: haiku: hrev52263 - data/etc src/system/kernel/fs

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 22 Aug 2018 08:17:02 +0200

On Tue, Aug 21, 2018 at 09:25:43PM -0400, waddlesplash wrote:

hrev52263 adds 2 changesets to branch 'master'
old head: d37ae8656890f523b97293f026c4246f7d723b45
new head: 0217e08a6355a03013f9609a6fa65fdab5e3eb41
overview: 
https://git.haiku-os.org/haiku/log/?qt=range&q=0217e08a6355+%5Ed37ae8656890

----------------------------------------------------------------------------

9d1582e31ace: etc/profile: Add kallisti5's smiley-face $? indicator and use $ 
not >.
  
  An example of the new prompt line format is:
  
  ~/Desktop/haiku :) $
  
  Or if the last command exited in failure:
  
  ~/Desktop/haiku :( $
  
  The smiley-face will be either dark green or red, also depending on
  the command status.

Let's paint the bikeshed!

I'd rather use √ and ╳ (there are more appropriate codepoints, but these
look fine and are available in Noto Sans Mono).

  
  I realize this could be a tad controversial, especially for those used
  to the old prompt, but it seems to be a pretty useful feature to me
  (and of course kallisti5 came up with it.) 

Actually I have been using something similar for a few years (turning
the whole prompt green or red depending on error status - which has the
advantage of not wasting any space and also making the prompt more
visible than our standard black).

  But if the bikeshed turns
  out to be too large, we can revert it and deal with it after the beta.
  
  As for $ vs > -- BeOS R5 used $, most modern Linux uses $, and having >
  come after a space looks much stranger.

I like > as a prompt (it was used in AmigaOS and MS-DOS, if you need
some prior use argument :) ). Also the Linux convention is $ vs # for
non-root/root, and we don't have this distinction. A fancier arrow or
triangle would be better, but apparently Noto Sans Mono doesn't have one
(Noto Sans Mono CJK JP does, but it is an entirely different font. I'll
have to check what's up with the Noto monospace fonts again).

If using unicode checkmarks as suggested above, I think we can do away
with the space:

√ ~/Desktop/haiku>
╳ ~/Desktop/haiku>

It makes sense to put them before the path this way, because they refer
to the previous command. It makes them maybe slightly less visible, but
with colors added this should not be a problem.


Other related posts: