On Thu, May 28, 2009 at 06:24:42PM +0300, Beni Cherniavsky wrote: > Finally, changing the scope of an existing variable is confusing. > Frequently I set a variable but forget to export it, or later decide I > want it universal.
actually, i don't think you can even change the scope of a variable, but when you set a variable of a different scope you get a new one, leaving the old one untouched. in other words, each scope seems to have its own namespace. but this is the way most programming languages work. like when i find that my screen terminals have the wrong DISPLAY set and i want to change it i usually set an universal variable since i want to change it for all terminals, so i do> set -Ux DISPLAY :1.0 but then i discover that $DISPLAY still has the old value because the universal variable is masked by the local one. so i also need to do> set -e DISPLAY; and only now $DISPLAY shows the right value. and really there is no easy way to solve that because even if you have a universal variable you need a way to override it in a specific shell. what might be nice is to have all vaiables that exist before fish is started be universal to begin with, which should work right in most cases because you can set a new value in every shell and you'd have to specifically change the universal variable. at least, i can't think of a case where this would cause problems. apart from that, the very existance of universal variables (including history) is one of the main reasons for using fish for me. greetings, martin. -- cooperative communication with sTeam - caudium, pike, roxen and unix offering: programming, training and administration - anywhere in the world -- pike programmer working in china community.gotpike.org unix system- iaeste.(tuwien.ac|or).at open-steam.org administrator caudium.org is.schon.org Martin Bähr http://www.iaeste.or.at/~mbaehr/ ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp as they present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
