[haiku-bugs] [Haiku] #10687: Add current architecture to PS1

  • From: "puckipedia" <trac@xxxxxxxxxxxx>
  • Date: Mon, 17 Mar 2014 18:09:35 -0000

#10687: Add current architecture to PS1
-------------------------------------+------------------------------
 Reporter:  puckipedia               |        Owner:  nobody
     Type:  enhancement              |       Status:  new
 Priority:  normal                   |    Milestone:  R1
Component:  - General                |      Version:  R1/Development
 Keywords:  bash, ps1, getarch, bin  |   Blocked By:
 Blocking:                           |  Has a Patch:  0
 Platform:  All                      |
-------------------------------------+------------------------------
 This patch changes two things:

 - It makes `setarch` add the current arch to the start of PS1 (disableable
 with the `-n` (`--no-ps1`) argument)
 - It changes `/etc/profile` to add the starting arch to the PS1 (or
 `unknown` if `getarch` isn't available)

 It looks like this:


 {{{

 Welcome to the Haiku shell.

 [x86_gcc2] ~> setarch x86
 [x86] [x86_gcc2] ~> getarch
 x86
 [x86] [x86_gcc2] ~> setarch x86_gcc2
 [x86_gcc2] [x86] [x86_gcc2] ~> exit
 exit
 [x86] [x86_gcc2] ~> exit
 exit
 [x86_gcc2] ~> getarch
 x86_gcc2
 }}}

--
Ticket URL: <https://dev.haiku-os.org/ticket/10687>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: