@@ -984,14 +984,12 @@ mod cmd {
985 let style = match args.get(0) {
985 let style = match args.get(0) {
986 Some(arg) if "tabs".starts_with(&arg.to_lowercase()) => Some(Tabs),
986 Some(arg) if "tabs".starts_with(&arg.to_lowercase()) => Some(Tabs),
987− Some(arg) if arg.len() == 1 => {
987+ Some(&"0") => Some(Tabs),
988− let ch = arg.chars().next().unwrap();
988+ Some(arg) => arg
989− if ('1'..='8').contains(&ch) {
991+ .filter(|n| (1..=8).contains(n))
990− Some(Spaces(ch.to_digit(10).unwrap() as u8))
992+ .map(Spaces),
995 _ => None,
993 _ => None,
@@ -1166,7 +1164,7 @@ mod cmd {
1166 completer: None,
1164 completer: None,
1168 Command {
1166 Command {
1169− name: "indent_style",
1167+ name: "indent-style",
1170 alias: None,
1168 alias: None,
1171 doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
1169 doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
1172 fun: set_indent_style,
1170 fun: set_indent_style,