mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-27 14:45:13 +08:00
parent
d6d3abf59a
commit
dfcb4b811c
@ -56,16 +56,17 @@ echo \|(string pad --width 10 --right foo)\|
|
|||||||
|
|
||||||
# Pad string with multi-width emoji.
|
# Pad string with multi-width emoji.
|
||||||
string pad -w 4 -c . 🐟
|
string pad -w 4 -c . 🐟
|
||||||
# CHECK: ..🐟
|
# NOTE: These are regex'd because the testing system might have an older/newer wcwidth.
|
||||||
|
# CHECK: .{{.*}}🐟
|
||||||
|
|
||||||
# Pad with multi-width character.
|
# Pad with multi-width character.
|
||||||
string pad -w 3 -c 🐟 .
|
string pad -w 3 -c 🐟 .
|
||||||
# CHECK: 🐟.
|
# CHECK: {{🐟+}}.
|
||||||
|
|
||||||
# Multi-width pad with remainder, complemented with a space.
|
# Multi-width pad with remainder, complemented with a space.
|
||||||
string pad -w 4 -c 🐟 k kk
|
string pad -w 4 -c 🐟 k kk
|
||||||
# CHECK: 🐟 k
|
# CHECK: {{🐟+}} k
|
||||||
# CHECK: 🐟kk
|
# CHECK: {{🐟+}}kk
|
||||||
|
|
||||||
# Pad to the maximum length.
|
# Pad to the maximum length.
|
||||||
string pad -c . long longer longest
|
string pad -c . long longer longest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user