You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
alias evaluation is not deterministic. reissuing same aliased command has random effect.
Steps to reproduce
$ incus alias list -f compact | grep prof
prof profile
prof ls profile list -f compact
profile ls profile list -f compact
$ incus prof ls
+---------+-----------------------+---------+
| NAME | DESCRIPTION | USED BY |
+---------+-----------------------+---------+
| default | Default Incus profile | 0 |
+---------+-----------------------+---------+
$ incus prof ls
NAME DESCRIPTION USED BY
default Default Incus profile 0
$ incus prof ls
NAME DESCRIPTION USED BY
default Default Incus profile 0
$ incus prof ls
+---------+-----------------------+---------+
| NAME | DESCRIPTION | USED BY |
+---------+-----------------------+---------+
| default | Default Incus profile | 0 |
+---------+-----------------------+---------+
note how sometimes compact is in effect, other times it is not, although it's the same command. It seems roughly even, with a little bias towards ignoring format:
$ unset hits; declare -A hits; \
for ((i = 0; i < 1000; i++))
do len=$(incus prof ls | wc -l); let "hits[$len]++"; done; \
for hit in ${!hits[@]}; do echo "$hit:${hits[$hit]}"; done
5:589
2:411
The text was updated successfully, but these errors were encountered:
Why does one of the possibilities it's cycling between, not have the -f compact? For these alias definitions:
prof profile
prof ls profile list -f compact
profile ls profile list -f compact
both forms with the ls have -f compact. So why is incus prof ls resolving to any possibility without it? Stranger still, it knows enough to expand the list part but drops the -f compact !?
Note, they were defined like:
$ incus alias add "prof ls" "profile list -f compact"
Required information
Issue description
alias evaluation is not deterministic. reissuing same aliased command has random effect.
Steps to reproduce
note how sometimes compact is in effect, other times it is not, although it's the same command. It seems roughly even, with a little bias towards ignoring format:
The text was updated successfully, but these errors were encountered: