Skip to content

Commit

Permalink
Allow shorthand for list (ls)
Browse files Browse the repository at this point in the history
  • Loading branch information
coreyja authored and brianp committed Aug 1, 2020
1 parent bf3c44f commit 78ec706
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions common/src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pub struct Args {
pub cmd_new: bool,
pub cmd_snapshot: bool,
pub cmd_list: bool,
pub cmd_ls: bool,
}

impl Default for Args {
Expand All @@ -44,6 +45,7 @@ impl Default for Args {
cmd_new: true,
cmd_snapshot: false,
cmd_list: false,
cmd_ls: false,
flag_d: true,
flag_debug: false,
flag_f: false,
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ static DISALLOWED_SHORTHAND_PROJECT_NAMES: [&str; 4] = ["new", "edit", "load", "

static USAGE: &str = "
Usage:
muxed list
muxed (list | ls)
muxed [flags] [options] <project>
muxed edit [options] <project>
muxed load [flags] [options] <project>
Expand Down Expand Up @@ -100,7 +100,7 @@ pub fn main() {
try_or_err!(new::exec(args));
} else if args.cmd_snapshot {
try_or_err!(snapshot::exec(args));
} else if args.cmd_list {
} else if args.cmd_list || args.cmd_ls {
try_or_err!(list::exec(args));
} else {
if DISALLOWED_SHORTHAND_PROJECT_NAMES.contains(&args.arg_project.as_ref()) {
Expand Down

0 comments on commit 78ec706

Please sign in to comment.