8000 Command line expansion · mfoemmel/fig Wiki · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Command line expansion

Elliot Shank edited this page Apr 12, 2017 · 13 revisions

E 8000 xpansion of "@" and "@package" in commands

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
Clone this wiki locally
0