On Tue, Nov 18, 2008 at 1:52 PM, Myrddin Emrys <[EMAIL PROTECTED]> wrote:
> #!/bin/fish
> if test -f .defaults
>   # do something to import the variables here

   .    .defaults  # note the '.' command!

> 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?

See http://www.fishshell.org/user_doc/commands.html#source

Use the '.' command to evaluate the contents of the .defaults file
inside the current shell.  Inside the .defaults file, you should have:

 set VAR foo
 set foo bar
 set time (date)

You can put any fish shell commands inside .default

-------------------------------------------------------------------------
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

Reply via email to