Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 453584

Summary: app-shells/zsh - prompt_gentoo_setup: replace globally declared variables with local variables
Product: Gentoo Linux Reporter: Mark (voidzero) <mark>
Component: New packagesAssignee: Torsten Veller (RETIRED) <tove>
Status: RESOLVED FIXED    
Severity: normal CC: polynomial-c, radhermit
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Define necessary variables in a local context

Description Mark (voidzero) 2013-01-22 20:15:20 UTC
Created attachment 336518 [details, diff]
Define necessary variables in a local context

Supplied is a patch for the included colourful gentoo prompt. The patch replaces globally declared variables with local ones. There is no reason for the prompt specific variables to be defined in a global context.

I have 'setopt warncreateglobal' enabled in my shell by default. With this, whenever a script creates new global variables without explicitly making them global (typeset -g), it yields warnings on the shell. Very convenient :)
Comment 1 Mark (voidzero) 2013-04-09 08:38:00 UTC
There was a new zsh version but this patch was not implemented. Please implement, it'
Comment 2 Mark (voidzero) 2013-04-09 08:38:37 UTC
There was a new zsh version but this patch was not implemented. Please implement, it's trivial and simple.
Comment 3 Mark (voidzero) 2013-04-16 07:55:12 UTC
Hellooo is anyone there.... there..... here....... ere....... re......
Comment 4 Tim Harder gentoo-dev 2013-06-25 19:00:44 UTC
Fixed in CVS.