-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
deno completions only works for deno cli arguments not for file completions #10166
Comments
Does anyone have any clues or workarounds? |
I have determined that the lack of completion is caused by using a named parameter which uses |
If I remove the "=" so my command-line looks like:
It still doesn't work :(. If I then manually complete the filename, it still works, so the "=" isn't needed obviously |
Blocked on an upstream issue in clap: clap-rs/clap#568 |
It seems there isn't any reasonable progress there, not sure what it means that they removed the 3.0 milestone tags, maybe pushing it further down the roadmap..... Can't "we" switch to a different library? |
It seems like with clap 3, |
I can confirm that using diff --git a/cli/flags.rs b/cli/flags.rs
index 614a975b1..2968a286c 100644
--- a/cli/flags.rs
+++ b/cli/flags.rs
@@ -6,6 +6,7 @@ use clap::Arg;
use clap::ArgMatches;
use clap::ArgSettings;
use clap::ColorChoice;
+use clap::ValueHint;
use deno_core::serde::Deserialize;
use deno_core::serde::Serialize;
use deno_core::url::Url;
@@ -1355,7 +1356,8 @@ fn test_subcommand<'a>() -> App<'a> {
.help("List of file names to run")
.takes_value(true)
.multiple_values(true)
- .multiple_occurrences(true),
+ .multiple_occurrences(true)
+ .value_hint(ValueHint::FilePath),
)
.arg(
watch_arg(false)
@@ -1799,6 +1801,7 @@ fn script_arg<'a>() -> Arg<'a> {
])
.help("Script arg")
.value_name("SCRIPT_ARG")
+ .value_hint(ValueHint::FilePath)
}
fn lock_arg<'a>() -> Arg<'a> { Of course I haven't been able to specify |
Seems this is fixed |
Hi,
I'm using oh-my-zsh with "deno completions zsh". brew installed them in "/usr/local/share/zsh/site-functions".
I believe the basic completions work brilliantly to autocomplete deno arguments.
Somehow it seems that the "normal" path auto completion is not working.
Let take this example. My command "so far" is:
deno --unstable run --allow-all --import-map=deps.json exa
If I then press tab, I would expect exa to autocomplete to example.ts if that file is in the current directory..... It doesn't. It seems after I start with deno only deno "native" commandline options are presented and not the filesystem
Any Clues?
Sander
The text was updated successfully, but these errors were encountered: