-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mktemp: replace workaround code with features of clap 3 #3454
Comments
I'm not sure if the linked issue in clap 3 fixes the problem. The issue stems from the fact that clap will interpret the value of Adding |
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
Fixes uutils#3454 This implementation more closely matches the behavior of GNU mktemp. Specifically, if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir` then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`), so that there is no ambiguity with also passing a TEMPLATE. The downside to this implementation is we are now introducing a new workaround for clap-rs/clap#4702 where we use separate calls to `.arg()` for the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
This code has a comment describing a workaround for a missing feature in clap that was not available until clap 3:
coreutils/src/uu/mktemp/src/mktemp.rs
Lines 89 to 98 in bf3a86f
Perhaps some code here can be simplified now that clap 3 is available?
The text was updated successfully, but these errors were encountered: