mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
Merge pull request #5055 from yt2b/ls_literal_option
ls: --l should output the same as --literal
This commit is contained in:
commit
0b37b63ea3
2 changed files with 4 additions and 1 deletions
|
@ -1202,6 +1202,7 @@ pub fn uu_app() -> Command {
|
||||||
Arg::new(options::quoting::LITERAL)
|
Arg::new(options::quoting::LITERAL)
|
||||||
.short('N')
|
.short('N')
|
||||||
.long(options::quoting::LITERAL)
|
.long(options::quoting::LITERAL)
|
||||||
|
.alias("l")
|
||||||
.help("Use literal quoting style. Equivalent to `--quoting-style=literal`")
|
.help("Use literal quoting style. Equivalent to `--quoting-style=literal`")
|
||||||
.overrides_with_all([
|
.overrides_with_all([
|
||||||
options::QUOTING_STYLE,
|
options::QUOTING_STYLE,
|
||||||
|
|
|
@ -22,7 +22,6 @@ use std::time::Duration;
|
||||||
const LONG_ARGS: &[&str] = &[
|
const LONG_ARGS: &[&str] = &[
|
||||||
"-l",
|
"-l",
|
||||||
"--long",
|
"--long",
|
||||||
"--l",
|
|
||||||
"--format=long",
|
"--format=long",
|
||||||
"--for=long",
|
"--for=long",
|
||||||
"--format=verbose",
|
"--format=verbose",
|
||||||
|
@ -2370,6 +2369,7 @@ fn test_ls_quoting_style() {
|
||||||
("--quoting-style=literal", "one?two"),
|
("--quoting-style=literal", "one?two"),
|
||||||
("-N", "one?two"),
|
("-N", "one?two"),
|
||||||
("--literal", "one?two"),
|
("--literal", "one?two"),
|
||||||
|
("--l", "one?two"),
|
||||||
("--quoting-style=c", "\"one\\ntwo\""),
|
("--quoting-style=c", "\"one\\ntwo\""),
|
||||||
("-Q", "\"one\\ntwo\""),
|
("-Q", "\"one\\ntwo\""),
|
||||||
("--quote-name", "\"one\\ntwo\""),
|
("--quote-name", "\"one\\ntwo\""),
|
||||||
|
@ -2394,6 +2394,7 @@ fn test_ls_quoting_style() {
|
||||||
("--quoting-style=literal", "one\ntwo"),
|
("--quoting-style=literal", "one\ntwo"),
|
||||||
("-N", "one\ntwo"),
|
("-N", "one\ntwo"),
|
||||||
("--literal", "one\ntwo"),
|
("--literal", "one\ntwo"),
|
||||||
|
("--l", "one\ntwo"),
|
||||||
("--quoting-style=shell", "one\ntwo"), // FIXME: GNU ls quotes this case
|
("--quoting-style=shell", "one\ntwo"), // FIXME: GNU ls quotes this case
|
||||||
("--quoting-style=shell-always", "'one\ntwo'"),
|
("--quoting-style=shell-always", "'one\ntwo'"),
|
||||||
] {
|
] {
|
||||||
|
@ -2455,6 +2456,7 @@ fn test_ls_quoting_style() {
|
||||||
("--quoting-style=literal", "one two"),
|
("--quoting-style=literal", "one two"),
|
||||||
("-N", "one two"),
|
("-N", "one two"),
|
||||||
("--literal", "one two"),
|
("--literal", "one two"),
|
||||||
|
("--l", "one two"),
|
||||||
("--quoting-style=c", "\"one two\""),
|
("--quoting-style=c", "\"one two\""),
|
||||||
("-Q", "\"one two\""),
|
("-Q", "\"one two\""),
|
||||||
("--quote-name", "\"one two\""),
|
("--quote-name", "\"one two\""),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue