The Fish wiki has a short page about this.[1] Feel free to expand it. Yes, in Bash, variables are set using "export", not "set"; see the Bash manual page, section "Shell Builtin Commands".
[1] http://fishshell.org/wiki/moin.cgi/BashToFish On Thu, Mar 25, 2010 at 11:44 AM, chombee <[email protected]> wrote: > Is there a list somewhere of where fish's syntax is compatible and > incompatible with other shells (sh, bash, zsh)? > > I'm trying to share as much of my shell configuration as possible between > shells by putting it in files that are evaluated by each shell. For example > I moved all my aliases into ~/.aliases and added . ~/.aliases to my fish > config file. The alias command seems to be compatible, so other shells > should be able to source the same aliases file. > > My fish config file also has a lot of variables set with the set or set -x > command. From reading the man files of sh and bash and doing a quick test > with bash, fish's set syntax does not seem to be supported by other shells. > > For example in fish: > > fish > set foo 'bar' > fish > echo $foo > bar > fish > > > but in bash: > > bash:$ set foo 'bar' > bash:$ echo $foo > > bash:$ > > and also comparing my fish and bash config files fish seems to use set -x to > set an environment variable, whereas bash uses export. ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Fish-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/fish-users
