-
Notifications
You must be signed in to change notification settings - Fork 10
Command line expansion
Elliot Shank edited this page Apr 12, 2017
·
13 revisions
All arguments of a command to be run, either from Fig's
command-line or a command
statement are
subject to "@package" and "@" expansion. Anywhere in an argument that an at
sign followed by a valid package name is found, the directory for that package
will be substituted. Additionally, the same "@" expansion done on
variables is performed on the components of a command.
For either the command-line
fig -- echo 'foo@somepackage/bar'
or simply running fig
with a base package containing
grammar v0
config default
command "echo foo@somepackage/bar"
end
the output will look like the expansion of foo$FIG_HOME/.../somepackage/bar
.
At signs can be escaped via backslashes, e.g.
fig -- echo 'foo\@something/bar'
or by using the v1 grammar or later and single quoting.
grammar v1
config default
command 'echo foo@something/bar'
end