Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 336518 Details for
Bug 453584
app-shells/zsh - prompt_gentoo_setup: replace globally declared variables with local variables
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Define necessary variables in a local context
prompt_gentoo_setup-use_local_variables.patch (text/plain), 1.21 KB, created by
Mark (voidzero)
on 2013-01-22 20:15:20 UTC
(
hide
)
Description:
Define necessary variables in a local context
Filename:
MIME Type:
Creator:
Mark (voidzero)
Created:
2013-01-22 20:15:20 UTC
Size:
1.21 KB
patch
obsolete
>--- old/prompt_gentoo_setup 2013-01-22 21:02:31.670664597 +0100 >+++ new/prompt_gentoo_setup 2013-01-22 21:07:53.710664876 +0100 >@@ -10,24 +10,24 @@ > } > > prompt_gentoo_setup () { >- prompt_gentoo_prompt=${1:-'blue'} >- prompt_gentoo_user=${2:-'green'} >- prompt_gentoo_root=${3:-'red'} >+ local prompt_gentoo_prompt=${1:-'blue'} >+ local prompt_gentoo_user=${2:-'green'} >+ local prompt_gentoo_root=${3:-'red'} > > if [ "$USER" = 'root' ] > then >- base_prompt="%B%F{$prompt_gentoo_root}%m%k " >+ local base_prompt="%B%F{$prompt_gentoo_root}%m%k " > else >- base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k " >+ local base_prompt="%B%F{$prompt_gentoo_user}%n@%m%k " > fi >- post_prompt="%b%f%k" >+ local post_prompt="%b%f%k" > > #setopt noxtrace localoptions > >- path_prompt="%B%F{$prompt_gentoo_prompt}%1~" >- PS1="$base_prompt$path_prompt %# $post_prompt" >- PS2="$base_prompt$path_prompt %_> $post_prompt" >- PS3="$base_prompt$path_prompt ?# $post_prompt" >+ local path_prompt="%B%F{$prompt_gentoo_prompt}%1~" >+ typeset -g PS1="$base_prompt$path_prompt %# $post_prompt" >+ typeset -g PS2="$base_prompt$path_prompt %_> $post_prompt" >+ typeset -g PS3="$base_prompt$path_prompt ?# $post_prompt" > } > > prompt_gentoo_setup "$@"
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 453584
: 336518