mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-04-21 08:51:14 -03:00
Added a -C/--center option to string pad.
The --center option does exactly what you'd expect. When a perfectly centred result is not possible, this adds extra padding to the left. If the --right option is also given, the extra padding is added to the right.
This commit is contained in:
@@ -8,7 +8,7 @@ Synopsis
|
||||
|
||||
.. synopsis::
|
||||
|
||||
string pad [-r | --right] [(-c | --char) CHAR] [(-w | --width) INTEGER]
|
||||
string pad [-r | --right] [-C | --center] [(-c | --char) CHAR] [(-w | --width) INTEGER]
|
||||
[STRING ...]
|
||||
|
||||
.. END SYNOPSIS
|
||||
@@ -22,6 +22,8 @@ Description
|
||||
|
||||
The escape sequences reflect what fish knows about, and how it computes its output. Your terminal might support more escapes, or not support escape sequences that fish knows about.
|
||||
|
||||
If **-C** or **--center** is given, add the padding to before and after the string. If it is impossible to perfectly center the result (because the required amount of padding is an odd number), extra padding will be added to the left, unless **--right** is also given.
|
||||
|
||||
If **-r** or **--right** is given, add the padding after a string.
|
||||
|
||||
If **-c** or **--char** is given, pad with *CHAR* instead of whitespace.
|
||||
|
||||
@@ -18,7 +18,7 @@ Synopsis
|
||||
[-g | --groups-only] [-r | --regex] [-n | --index]
|
||||
[-q | --quiet] [-v | --invert]
|
||||
PATTERN [STRING ...]
|
||||
string pad [-r | --right] [(-c | --char) CHAR] [(-w | --width) INTEGER]
|
||||
string pad [-r | --right] [-C | --center] [(-c | --char) CHAR] [(-w | --width) INTEGER]
|
||||
[STRING ...]
|
||||
string repeat [(-n | --count) COUNT] [(-m | --max) MAX] [-N | --no-newline]
|
||||
[-q | --quiet] [STRING ...]
|
||||
|
||||
Reference in New Issue
Block a user