feat: V5a show relationship/index <name> detail views
Fold the singular per-item forms into Command::ShowList { kind,
name: Option<String> } (name: Some = one item). Two grammar
branches reuse the relationship/index completion sources; worker
do_show_one renders a labelled detail block or a friendly
"No ... named X." line, reusing the V5 render path. Help +
parse-usage entries, two ADR-0042 near-miss rows, 5 integration
tests. Mark V5a [x] — V5's [<name>] clause now complete.
This commit is contained in:
+5
-2
@@ -2890,6 +2890,8 @@ mod tests {
|
||||
"show tables",
|
||||
"show relationships",
|
||||
"show indexes",
|
||||
"show relationship",
|
||||
"show index",
|
||||
] {
|
||||
app.update(key(KeyCode::Tab));
|
||||
assert_eq!(app.input, expected);
|
||||
@@ -2903,8 +2905,9 @@ mod tests {
|
||||
fn shift_tab_cycles_backward_starting_from_last() {
|
||||
let mut app = App::new();
|
||||
type_str(&mut app, "show ");
|
||||
// Backward starts from the last candidate (`indexes`).
|
||||
for expected in ["show indexes", "show relationships", "show tables"] {
|
||||
// Backward starts from the last candidate (`index`, the
|
||||
// V5a singular form).
|
||||
for expected in ["show index", "show relationship", "show indexes"] {
|
||||
app.update(key(KeyCode::BackTab));
|
||||
assert_eq!(app.input, expected);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user