-
So in order to allow me to pass extra arguments to Qemu, I've tried the following: def main [--drive: path, ...extra: string] {
qemu-system-x86_64
--drive $drive # not a real implemenation
...$extra
} This is problematic because Nu recognises the the Next I tried a list of strings: def main [--drive: path, extra: list] {
# same as above
}
main --drive ./cheese.qcow2 ['--cdrom' 'os.raw'] which failed for the same reason. What might be the best way to pass an argument-looking value to a function without it being interpreted as such? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi, you're looking for |
Beta Was this translation helpful? Give feedback.
Hi, you're looking for
def --wrapped
. This option allows rest args to absorb unknown flags as well, and it's meant exactly for this purpose.