refactor!: drop the .install remote migration hint
'remote' is no longer special-cased anywhere; the token falls through to the unified .install dispatch like any other value.
This commit is contained in:
@@ -875,9 +875,6 @@ pub async fn run_repl_command(
|
|||||||
ReplInstallDispatch::Unified(value) => {
|
ReplInstallDispatch::Unified(value) => {
|
||||||
config::install_or_update_from_repl_args(value)?;
|
config::install_or_update_from_repl_args(value)?;
|
||||||
}
|
}
|
||||||
ReplInstallDispatch::RemovedRemote => println!(
|
|
||||||
"'.install remote <git-url>' was removed; use '.install <git-url>' directly."
|
|
||||||
),
|
|
||||||
ReplInstallDispatch::Usage => println!(
|
ReplInstallDispatch::Usage => println!(
|
||||||
"Usage: .install <{}> | .install <git-url|owner/repo|installed-bundle> \
|
"Usage: .install <{}> | .install <git-url|owner/repo|installed-bundle> \
|
||||||
[--git-host <host>] [--filter <cat>] [--force]",
|
[--git-host <host>] [--filter <cat>] [--force]",
|
||||||
@@ -1586,7 +1583,6 @@ fn unknown_command() -> Result<()> {
|
|||||||
enum ReplInstallDispatch<'a> {
|
enum ReplInstallDispatch<'a> {
|
||||||
Builtins(AssetCategory),
|
Builtins(AssetCategory),
|
||||||
Unified(&'a str),
|
Unified(&'a str),
|
||||||
RemovedRemote,
|
|
||||||
Usage,
|
Usage,
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1599,7 +1595,6 @@ fn parse_repl_install(args: Option<&str>) -> ReplInstallDispatch<'_> {
|
|||||||
match AssetCategory::parse(name) {
|
match AssetCategory::parse(name) {
|
||||||
Some(category) if rest.is_empty() => ReplInstallDispatch::Builtins(category),
|
Some(category) if rest.is_empty() => ReplInstallDispatch::Builtins(category),
|
||||||
Some(_) => ReplInstallDispatch::Usage,
|
Some(_) => ReplInstallDispatch::Usage,
|
||||||
None if name == "remote" && !rest.is_empty() => ReplInstallDispatch::RemovedRemote,
|
|
||||||
None => ReplInstallDispatch::Unified(trimmed),
|
None => ReplInstallDispatch::Unified(trimmed),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1870,18 +1865,6 @@ mod tests {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn parse_repl_install_hints_on_removed_remote_form() {
|
|
||||||
assert_eq!(
|
|
||||||
parse_repl_install(Some("remote https://github.com/x/y")),
|
|
||||||
ReplInstallDispatch::RemovedRemote
|
|
||||||
);
|
|
||||||
assert_eq!(
|
|
||||||
parse_repl_install(Some("remote")),
|
|
||||||
ReplInstallDispatch::Unified("remote")
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn builtin_command_names_are_sorted_deduped_first_words_without_dots() {
|
fn builtin_command_names_are_sorted_deduped_first_words_without_dots() {
|
||||||
let names = builtin_command_names();
|
let names = builtin_command_names();
|
||||||
|
|||||||
Reference in New Issue
Block a user