|
|
@@ -16,9 +16,9 @@ pub static DEREF_LINKS: Arg = Arg { short: Some(b'X'), long: "dereference", take
|
|
|
pub static WIDTH: Arg = Arg { short: Some(b'w'), long: "width", takes_value: TakesValue::Necessary(None) };
|
|
|
pub static NO_QUOTES:Arg = Arg { short: None, long: "no-quotes",takes_value: TakesValue::Forbidden };
|
|
|
|
|
|
-pub static COLOR: Arg = Arg { short: None, long: "color", takes_value: TakesValue::Necessary(Some(COLOURS)) };
|
|
|
-pub static COLOUR: Arg = Arg { short: None, long: "colour", takes_value: TakesValue::Necessary(Some(COLOURS)) };
|
|
|
-const COLOURS: &[&str] = &["always", "auto", "never"];
|
|
|
+pub static COLOR: Arg = Arg { short: None, long: "color", takes_value: TakesValue::Optional(Some(WHEN)) };
|
|
|
+pub static COLOUR: Arg = Arg { short: None, long: "colour", takes_value: TakesValue::Optional(Some(WHEN)) };
|
|
|
+const WHEN: &[&str] = &["always", "auto", "never"];
|
|
|
|
|
|
pub static COLOR_SCALE: Arg = Arg { short: None, long: "color-scale", takes_value: TakesValue::Forbidden };
|
|
|
pub static COLOUR_SCALE: Arg = Arg { short: None, long: "colour-scale", takes_value: TakesValue::Forbidden };
|
|
|
@@ -45,8 +45,7 @@ pub static BYTES: Arg = Arg { short: Some(b'B'), long: "bytes", takes_
|
|
|
pub static GROUP: Arg = Arg { short: Some(b'g'), long: "group", takes_value: TakesValue::Forbidden };
|
|
|
pub static NUMERIC: Arg = Arg { short: Some(b'n'), long: "numeric", takes_value: TakesValue::Forbidden };
|
|
|
pub static HEADER: Arg = Arg { short: Some(b'h'), long: "header", takes_value: TakesValue::Forbidden };
|
|
|
-pub static ICONS: Arg = Arg { short: None, long: "icons", takes_value: TakesValue::Necessary(Some(ICONS_VALUES ))};
|
|
|
-const ICONS_VALUES: Values = &["always", "auto", "never"];
|
|
|
+pub static ICONS: Arg = Arg { short: None, long: "icons", takes_value: TakesValue::Optional(Some(WHEN))};
|
|
|
pub static INODE: Arg = Arg { short: Some(b'i'), long: "inode", takes_value: TakesValue::Forbidden };
|
|
|
pub static LINKS: Arg = Arg { short: Some(b'H'), long: "links", takes_value: TakesValue::Forbidden };
|
|
|
pub static MODIFIED: Arg = Arg { short: Some(b'm'), long: "modified", takes_value: TakesValue::Forbidden };
|
|
|
@@ -67,7 +66,6 @@ pub static NO_PERMISSIONS: Arg = Arg { short: None, long: "no-permissions", take
|
|
|
pub static NO_FILESIZE: Arg = Arg { short: None, long: "no-filesize", takes_value: TakesValue::Forbidden };
|
|
|
pub static NO_USER: Arg = Arg { short: None, long: "no-user", takes_value: TakesValue::Forbidden };
|
|
|
pub static NO_TIME: Arg = Arg { short: None, long: "no-time", takes_value: TakesValue::Forbidden };
|
|
|
-pub static NO_ICONS: Arg = Arg { short: None, long: "no-icons", takes_value: TakesValue::Forbidden };
|
|
|
|
|
|
// optional feature options
|
|
|
pub static GIT: Arg = Arg { short: None, long: "git", takes_value: TakesValue::Forbidden };
|
|
|
@@ -89,7 +87,7 @@ pub static ALL_ARGS: Args = Args(&[
|
|
|
|
|
|
&BINARY, &BYTES, &GROUP, &NUMERIC, &HEADER, &ICONS, &INODE, &LINKS, &MODIFIED, &CHANGED,
|
|
|
&BLOCKSIZE, &TIME, &ACCESSED, &CREATED, &TIME_STYLE, &HYPERLINK, &MOUNTS,
|
|
|
- &NO_PERMISSIONS, &NO_FILESIZE, &NO_USER, &NO_TIME, &NO_ICONS, &SMART_GROUP,
|
|
|
+ &NO_PERMISSIONS, &NO_FILESIZE, &NO_USER, &NO_TIME, &SMART_GROUP,
|
|
|
|
|
|
&GIT, &NO_GIT, &GIT_REPOS, &GIT_REPOS_NO_STAT,
|
|
|
&EXTENDED, &OCTAL, &SECURITY_CONTEXT
|