|
241 | 241 | .ok()
|
242 | 242 | .and_then(|i| i.parse().ok());
|
243 | 243 | let ifs: Option<String> = std::env::var("IFS").ok().and_then(|i| i.parse().ok());
|
244 |
| - let completions = crate::dynamic::complete(cmd, args, index, current_dir)?; |
| 244 | + let completions = crate::engine::complete(cmd, args, index, current_dir)?; |
245 | 245 |
|
246 | 246 | for (i, candidate) in completions.iter().enumerate() {
|
247 | 247 | if i != 0 {
|
@@ -335,7 +335,7 @@ set edit:completion:arg-completer[BIN] = { |@words|
|
335 | 335 | .and_then(|i| i.parse().ok())
|
336 | 336 | .unwrap_or_default();
|
337 | 337 | let ifs: Option<String> = std::env::var("_CLAP_IFS").ok().and_then(|i| i.parse().ok());
|
338 |
| - let completions = crate::dynamic::complete(cmd, args, index, current_dir)?; |
| 338 | + let completions = crate::engine::complete(cmd, args, index, current_dir)?; |
339 | 339 |
|
340 | 340 | for (i, candidate) in completions.iter().enumerate() {
|
341 | 341 | if i != 0 {
|
@@ -376,7 +376,7 @@ impl CommandCompleter for Fish {
|
376 | 376 | buf: &mut dyn std::io::Write,
|
377 | 377 | ) -> Result<(), std::io::Error> {
|
378 | 378 | let index = args.len() - 1;
|
379 |
| - let completions = crate::dynamic::complete(cmd, args, index, current_dir)?; |
| 379 | + let completions = crate::engine::complete(cmd, args, index, current_dir)?; |
380 | 380 |
|
381 | 381 | for candidate in completions {
|
382 | 382 | write!(buf, "{}", candidate.get_content().to_string_lossy())?;
|
@@ -442,7 +442,7 @@ Register-ArgumentCompleter -Native -CommandName {bin} -ScriptBlock {{
|
442 | 442 | buf: &mut dyn std::io::Write,
|
443 | 443 | ) -> Result<(), std::io::Error> {
|
444 | 444 | let index = args.len() - 1;
|
445 |
| - let completions = crate::dynamic::complete(cmd, args, index, current_dir)?; |
| 445 | + let completions = crate::engine::complete(cmd, args, index, current_dir)?; |
446 | 446 |
|
447 | 447 | for candidate in completions {
|
448 | 448 | write!(buf, "{}", candidate.get_content().to_string_lossy())?;
|
@@ -516,7 +516,7 @@ compdef _clap_dynamic_completer BIN"#
|
516 | 516 | if args.len() == index {
|
517 | 517 | args.push("".into());
|
518 | 518 | }
|
519 |
| - let completions = crate::dynamic::complete(cmd, args, index, current_dir)?; |
| 519 | + let completions = crate::engine::complete(cmd, args, index, current_dir)?; |
520 | 520 |
|
521 | 521 | for (i, candidate) in completions.iter().enumerate() {
|
522 | 522 | if i != 0 {
|
|
0 commit comments