Following this discussion, I am trying to set up the following alias in order to list the snapshots of a given container (without using lxc info, which is too verbose):
$ lxc alias add snaps 'query /1.0/instances/@ARGS@/snapshots'
However, it doesn’t work:
$ lxc snaps foo
[...]
Error: Invalid number of arguments
The problem seems to be with the @ARGS@ placeholder. I tried to “escape” it in various ways, all without success:
lxc alias add snaps "query /1.0/instances/'@ARGS@'/snapshots"
lxc alias add snaps 'query /1.0/instances/"@ARGS@"/snapshots'
lxc alias add snaps 'query "/1.0/instances/@ARGS@/snapshots"'
lxc alias add snaps "query '/1.0/instances/@ARGS@/snapshots'"
lxc alias add snaps "query /1.0/instances/\@ARGS\@/snapshots"
lxc alias add snaps 'query /1.0/instances/\@ARGS\@/snapshots'
lxc alias add snaps "query /1.0/instances/\\@ARGS\\@/snapshots"