Skip to content

Commit cb278bc

Browse files
committed
feat: add completions for install --path
1 parent c14c1c0 commit cb278bc

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/bin/cargo/commands/install.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ pub fn cli() -> Command {
6565
.arg(
6666
opt("path", "Filesystem path to local crate to install from")
6767
.value_name("PATH")
68-
.conflicts_with_all(&["git", "index", "registry"]),
68+
.conflicts_with_all(&["git", "index", "registry"])
69+
.add(clap_complete::engine::ArgValueCompleter::new(
70+
clap_complete::engine::PathCompleter::any()
71+
.filter(|path| path.join("Cargo.toml").exists()),
72+
)),
6973
)
7074
.arg(opt("root", "Directory to install packages into").value_name("DIR"))
7175
.arg(flag("force", "Force overwriting existing crates or binaries").short('f'))

0 commit comments

Comments
 (0)