mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-09 12:11:20 -03:00
committed by
Johannes Altmanninger
parent
1b0fa8f804
commit
149fec8f02
@@ -23,7 +23,8 @@ fn default() -> Self {
|
||||
|
||||
impl StringSubCommand<'_> for Pad {
|
||||
const LONG_OPTIONS: &'static [WOption<'static>] = &[
|
||||
// FIXME docs say `--char`, there was no long_opt with `--char` in C++
|
||||
// Support both spellings: docs use --char, older fish accepted --chars.
|
||||
wopt(L!("char"), RequiredArgument, 'c'),
|
||||
wopt(L!("chars"), RequiredArgument, 'c'),
|
||||
wopt(L!("right"), NoArgument, 'r'),
|
||||
wopt(L!("center"), NoArgument, 'C'),
|
||||
|
||||
@@ -25,7 +25,8 @@ fn default() -> Self {
|
||||
|
||||
impl<'args> StringSubCommand<'args> for Shorten<'args> {
|
||||
const LONG_OPTIONS: &'static [WOption<'static>] = &[
|
||||
// FIXME: documentation says it's --char
|
||||
// Support both spellings: docs use --char, older fish accepted --chars.
|
||||
wopt(L!("char"), RequiredArgument, 'c'),
|
||||
wopt(L!("chars"), RequiredArgument, 'c'),
|
||||
wopt(L!("max"), RequiredArgument, 'm'),
|
||||
wopt(L!("no-newline"), NoArgument, 'N'),
|
||||
|
||||
@@ -47,7 +47,7 @@ string pad foo
|
||||
string pad -C foo
|
||||
# CHECK: foo
|
||||
|
||||
string pad -r -w 7 --chars - foo
|
||||
string pad -r -w 7 --char - foo
|
||||
# CHECK: foo----
|
||||
string pad -r -w 7 --chars - --center foo
|
||||
# CHECK: --foo--
|
||||
@@ -1003,7 +1003,7 @@ string shorten --max 4 -c /// foobar
|
||||
string shorten --max 4 -c /// foobarnana
|
||||
# CHECK: f///
|
||||
|
||||
string shorten --max 2 --chars "" foo
|
||||
string shorten --max 2 --char "" foo
|
||||
# CHECK: fo
|
||||
|
||||
string shorten foo foobar
|
||||
|
||||
Reference in New Issue
Block a user