I'm a bit hazy on how variables, particularly transient ones, work in fish.
For example, a common idiom in bash is this:
VAR='foo' command
The variable will be set for that command only. I can't seem to replicate
this in fish... when I do this, the command does not receive the modified
environment variable:
set VAR 'foo'; command
An unrelated but similar question is how to import a list of environment
variables for a script. For example, I'd like to import a list of variables
from a non-executable file while running a separate script. Like this:
File: .defaults
CONTEST="HomeOnTheRange"
ACTIVE="03"
File: script.fish
#!/bin/fish
if test -f .defaults
# do something to import the variables here
end
# more commands
The format of the variables is malleable... however it has to look is fine.
set VAR foo
VAR<tab>foo
VAR=foo
Whatever works. What's the easiest way?
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users