Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 453584 - app-shells/zsh - prompt_gentoo_setup: replace globally declared variables with local variables
Summary: app-shells/zsh - prompt_gentoo_setup: replace globally declared variables wit...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Torsten Veller (RETIRED)
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2013-01-22 20:15 UTC by Mark (voidzero)
Modified: 2013-06-25 19:00 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Define necessary variables in a local context (prompt_gentoo_setup-use_local_variables.patch,1.21 KB, patch)
2013-01-22 20:15 UTC, Mark (voidzero)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.