diff --git a/README.md b/README.md index 04f292e98..4f031d7e4 100644 --- a/README.md +++ b/README.md @@ -80,7 +80,7 @@ These options are available when running with `--long` (`-l`): - **--git**: list each file’s Git status, if tracked or ignored - **--time-style**: how to format timestamps - **--no-permissions**: suppress the permissions field -- **--octal-permissions**: list each file's permission in octal format +- **-o**, **--octal-permissions**: list each file's permission in octal format - **--no-filesize**: suppress the filesize field - **--no-user**: suppress the user field - **--no-time**: suppress the time field diff --git a/completions/fish/exa.fish b/completions/fish/exa.fish index 5a1f5cdae..8ede34159 100755 --- a/completions/fish/exa.fish +++ b/completions/fish/exa.fish @@ -80,11 +80,11 @@ complete -c exa -l 'time-style' -d "How to format timestamps" -x -a " long-iso\t'Display longer ISO timestaps, up to the minute' full-iso\t'Display full ISO timestamps, up to the nanosecond' " -complete -c exa -l 'no-permissions' -d "Suppress the permissions field" -complete -c exa -l 'octal-permissions' -d "List each file's permission in octal format" -complete -c exa -l 'no-filesize' -d "Suppress the filesize field" -complete -c exa -l 'no-user' -d "Suppress the user field" -complete -c exa -l 'no-time' -d "Suppress the time field" +complete -c exa -l 'no-permissions' -d "Suppress the permissions field" +complete -c exa -s 'o' -l 'octal-permissions' -d "List each file's permission in octal format" +complete -c exa -l 'no-filesize' -d "Suppress the filesize field" +complete -c exa -l 'no-user' -d "Suppress the user field" +complete -c exa -l 'no-time' -d "Suppress the time field" # Optional extras complete -c exa -l 'git' -d "List each file's Git status, if tracked" diff --git a/completions/zsh/_exa b/completions/zsh/_exa index 0f993aa1d..5e983a24b 100644 --- a/completions/zsh/_exa +++ b/completions/zsh/_exa @@ -45,7 +45,7 @@ __exa() { {-t,--time}="[Which time field to show]:(time field):(accessed changed created modified)" \ --time-style="[How to format timestamps]:(time style):(default iso long-iso full-iso)" \ --no-permissions"[Suppress the permissions field]" \ - --octal-permissions"[List each file's permission in octal format]" \ + {-o, --octal-permissions}"[List each file's permission in octal format]" \ --no-filesize"[Suppress the filesize field]" \ --no-user"[Suppress the user field]" \ --no-time"[Suppress the time field]" \ diff --git a/man/exa.1.md b/man/exa.1.md index 29fcabedc..d52136d0b 100644 --- a/man/exa.1.md +++ b/man/exa.1.md @@ -168,6 +168,9 @@ These options are available when running with `--long` (`-l`): `--no-permissions` : Suppress the permissions field. +`-o`, `--octal-permissions` +: List each file's permissions in octal format. + `--no-filesize` : Suppress the file size field. diff --git a/src/options/flags.rs b/src/options/flags.rs index e15d69d6f..d9c190298 100644 --- a/src/options/flags.rs +++ b/src/options/flags.rs @@ -66,7 +66,7 @@ pub static GIT: Arg = Arg { short: None, long: "git", pub static GIT_REPOS: Arg = Arg { short: None, long: "git-repos", takes_value: TakesValue::Forbidden }; pub static GIT_REPOS_NO_STAT: Arg = Arg { short: None, long: "git-repos-no-status", takes_value: TakesValue::Forbidden }; pub static EXTENDED: Arg = Arg { short: Some(b'@'), long: "extended", takes_value: TakesValue::Forbidden }; -pub static OCTAL: Arg = Arg { short: None, long: "octal-permissions", takes_value: TakesValue::Forbidden }; +pub static OCTAL: Arg = Arg { short: Some(b'o'), long: "octal-permissions", takes_value: TakesValue::Forbidden }; pub static SECURITY_CONTEXT: Arg = Arg { short: Some(b'Z'), long: "context", takes_value: TakesValue::Forbidden }; diff --git a/src/options/help.rs b/src/options/help.rs index d6cb7a982..015f6d044 100644 --- a/src/options/help.rs +++ b/src/options/help.rs @@ -41,32 +41,31 @@ FILTERING AND SORTING OPTIONS date, time, old, and new all refer to modified. LONG VIEW OPTIONS - -b, --binary list file sizes with binary prefixes - -B, --bytes list file sizes in bytes, without any prefixes - -g, --group list each file's group - -h, --header add a header row to each column - -H, --links list each file's number of hard links - -i, --inode list each file's inode number - -m, --modified use the modified timestamp field - -n, --numeric list numeric user and group IDs - -S, --blocks show number of file system blocks - -t, --time FIELD which timestamp field to list (modified, accessed, created) - -u, --accessed use the accessed timestamp field - -U, --created use the created timestamp field - --changed use the changed timestamp field - --time-style how to format timestamps (default, iso, long-iso, full-iso) - --no-permissions suppress the permissions field - --octal-permissions list each file's permission in octal format - --no-filesize suppress the filesize field - --no-user suppress the user field - --no-time suppress the time field"; + -b, --binary list file sizes with binary prefixes + -B, --bytes list file sizes in bytes, without any prefixes + -g, --group list each file's group + -h, --header add a header row to each column + -H, --links list each file's number of hard links + -i, --inode list each file's inode number + -m, --modified use the modified timestamp field + -n, --numeric list numeric user and group IDs + -S, --blocks show number of file system blocks + -t, --time FIELD which timestamp field to list (modified, accessed, created) + -u, --accessed use the accessed timestamp field + -U, --created use the created timestamp field + --changed use the changed timestamp field + --time-style how to format timestamps (default, iso, long-iso, full-iso) + --no-permissions suppress the permissions field + -o, --octal-permissions list each file's permission in octal format + --no-filesize suppress the filesize field + --no-user suppress the user field + --no-time suppress the time field"; static GIT_FILTER_HELP: &str = " --git-ignore ignore files mentioned in '.gitignore'"; static GIT_VIEW_HELP: &str = " --git list each file's Git status, if tracked or ignored"; static EXTENDED_HELP: &str = " -@, --extended list each file's extended attributes and sizes"; static SECATTR_HELP: &str = " -Z, --context list each file's security context"; - /// All the information needed to display the help text, which depends /// on which features are enabled and whether the user only wants to /// see one section’s help. diff --git a/xtests/outputs/help.ansitxt b/xtests/outputs/help.ansitxt index 4e8cf5204..ceb2095dc 100644 --- a/xtests/outputs/help.ansitxt +++ b/xtests/outputs/help.ansitxt @@ -33,24 +33,24 @@ FILTERING AND SORTING OPTIONS date, time, old, and new all refer to modified. LONG VIEW OPTIONS - -b, --binary list file sizes with binary prefixes - -B, --bytes list file sizes in bytes, without any prefixes - -g, --group list each file's group - -h, --header add a header row to each column - -H, --links list each file's number of hard links - -i, --inode list each file's inode number - -m, --modified use the modified timestamp field - -n, --numeric list numeric user and group IDs - -S, --blocks show number of file system blocks - -t, --time FIELD which timestamp field to list (modified, accessed, created) - -u, --accessed use the accessed timestamp field - -U, --created use the created timestamp field - --changed use the changed timestamp field - --time-style how to format timestamps (default, iso, long-iso, full-iso) - --no-permissions suppress the permissions field - --octal-permissions list each file's permission in octal format - --no-filesize suppress the filesize field - --no-user suppress the user field - --no-time suppress the time field - --git list each file's Git status, if tracked or ignored - -@, --extended list each file's extended attributes and sizes + -b, --binary list file sizes with binary prefixes + -B, --bytes list file sizes in bytes, without any prefixes + -g, --group list each file's group + -h, --header add a header row to each column + -H, --links list each file's number of hard links + -i, --inode list each file's inode number + -m, --modified use the modified timestamp field + -n, --numeric list numeric user and group IDs + -S, --blocks show number of file system blocks + -t, --time FIELD which timestamp field to list (modified, accessed, created) + -u, --accessed use the accessed timestamp field + -U, --created use the created timestamp field + --changed use the changed timestamp field + --time-style how to format timestamps (default, iso, long-iso, full-iso) + --no-permissions suppress the permissions field + -o, --octal-permissions list each file's permission in octal format + --no-filesize suppress the filesize field + --no-user suppress the user field + --no-time suppress the time field + --git list each file's Git status, if tracked or ignored + -@, --extended list each file's extended attributes and sizes