Closed eadwu closed 3 years ago
This should be a clap issue, in this case, structopt just delegate everything to clap.
default_value
work as intended though
❯ result/bin/binary --
Arguments { cmd: ["SHELL"] }
❯ result/bin/binary -- $SHELL
Arguments { cmd: ["/nix/store/pfk6bllfmp7k939wwd6l3iycb500mvz2-zsh-5.8/bin/zsh"] }
❯ result/bin/binary -- $SHELL -i
Arguments { cmd: ["/nix/store/pfk6bllfmp7k939wwd6l3iycb500mvz2-zsh-5.8/bin/zsh", "-i"] }
❯ result/bin/binary -- -i
Arguments { cmd: ["-i"] }
❯ result/bin/binary -- -i $SHELL
Arguments { cmd: ["-i", "/nix/store/pfk6bllfmp7k939wwd6l3iycb500mvz2-zsh-5.8/bin/zsh"] }
As it's a won't fix in clap v2 as it's fixed in clap v3, I close this.
Using an
env
fallback seems to be confusing the collection of the arguments.Current Behavior:
Expected Behavior: