We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
--lockfile-path
2 parents 58cfd96 + 4afa6d7 commit e79bac1Copy full SHA for e79bac1
src/cargo/util/command_prelude.rs
@@ -345,7 +345,18 @@ pub trait CommandExt: Sized {
345
self._arg(
346
opt("lockfile-path", "Path to Cargo.lock (unstable)")
347
.value_name("PATH")
348
- .help_heading(heading::MANIFEST_OPTIONS),
+ .help_heading(heading::MANIFEST_OPTIONS)
349
+ .add(clap_complete::engine::ArgValueCompleter::new(
350
+ clap_complete::engine::PathCompleter::any().filter(|path: &Path| {
351
+ let file_name = match path.file_name() {
352
+ Some(name) => name,
353
+ None => return false,
354
+ };
355
+
356
+ // allow `Cargo.lock` file
357
+ file_name == OsStr::new("Cargo.lock")
358
+ }),
359
+ )),
360
)
361
}
362
0 commit comments