Skip to content

Commit eaa097d

Browse files
committed
Make 'list' the primary verb for kv listings (DX-5694)
'qn kv set ls' and 'qn kv list ls' were the only listings with 'ls' as the primary name. Renamed to 'list' with 'ls' as a visible alias, matching the convention everywhere else in the CLI. Both spellings keep working; existing tests invoke 'ls' and pass via the alias.
1 parent 49c0349 commit eaa097d

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

src/commands/kv/actions.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ pub(super) async fn set(cmd: SetCmd, ctx: Ctx) -> Result<(), CliError> {
3939
println!("{}", resp.value);
4040
}
4141
}
42-
SetCmd::Ls(a) => {
42+
SetCmd::List(a) => {
4343
let params = GetSetsParams {
4444
limit: a.limit,
4545
cursor: a.cursor,
@@ -86,7 +86,7 @@ pub(super) async fn set(cmd: SetCmd, ctx: Ctx) -> Result<(), CliError> {
8686

8787
pub(super) async fn list(cmd: ListCmd, ctx: Ctx) -> Result<(), CliError> {
8888
match cmd {
89-
ListCmd::Ls(a) => {
89+
ListCmd::List(a) => {
9090
let params = GetListsParams {
9191
limit: a.limit,
9292
cursor: a.cursor,

src/commands/kv/mod.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ pub enum SetCmd {
3838
/// Get the value stored under a key.
3939
Get { key: String },
4040
/// List all key/value entries.
41-
Ls(SetsLsArgs),
41+
#[command(visible_alias = "ls")]
42+
List(SetsLsArgs),
4243
/// Delete a single set.
4344
Delete { key: String },
4445
/// Add and/or delete multiple sets in one call.
@@ -66,7 +67,8 @@ pub struct BulkArgs {
6667
#[derive(Debug, Subcommand)]
6768
pub enum ListCmd {
6869
/// List all list keys.
69-
Ls(ListsLsArgs),
70+
#[command(visible_alias = "ls")]
71+
List(ListsLsArgs),
7072
/// Get items in a specific list (paginated).
7173
Get(ListGetArgs),
7274
/// Create a new list seeded with items.

0 commit comments

Comments
 (0)