Dynamic completer for view-name arguments. Runs in the user's CWD during completion; if there is no repository there it returns no candidates rather than erroring.
(current: &OsStr)
| 76 | /// Runs in the user's CWD during completion; if there is no repository there |
| 77 | /// it returns no candidates rather than erroring. |
| 78 | pub(crate) fn complete_view_names(current: &OsStr) -> Vec<CompletionCandidate> { |
| 79 | let prefix = current.to_string_lossy(); |
| 80 | let Ok(repo) = require_repository(None) else { |
| 81 | return Vec::new(); |
| 82 | }; |
| 83 | view_name_candidates(&repo, &prefix) |
| 84 | .into_iter() |
| 85 | .map(CompletionCandidate::new) |
| 86 | .collect() |
| 87 | } |
| 88 | |
| 89 | /// Dynamic completer for change-hash arguments, annotating each hash with its |
| 90 | /// commit message as the completion description. |
nothing calls this directly
no test coverage detected