2017-04-25 12:05:51 +08:00
|
|
|
# string match -r "[" "a[sd"
|
|
|
|
string match: Regular expression compile error: missing terminating ] for character class
|
|
|
|
string match: [
|
|
|
|
string match: ^
|
|
|
|
|
|
|
|
# string invalidarg
|
2017-06-20 12:05:34 +08:00
|
|
|
string: Subcommand 'invalidarg' is not valid
|
2017-07-14 11:36:59 +08:00
|
|
|
Standard input (line 251):
|
2017-04-25 12:05:51 +08:00
|
|
|
string invalidarg; and echo "unexpected exit 0" >&2
|
|
|
|
^
|
|
|
|
|
|
|
|
# string repeat -n-1 "foo"
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Invalid count value '-1'
|
2017-04-25 12:05:51 +08:00
|
|
|
|
|
|
|
# string repeat -m-1 "foo"
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Invalid max value '-1'
|
2017-04-25 12:05:51 +08:00
|
|
|
|
|
|
|
# string repeat -n notanumber "foo"
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Argument 'notanumber' is not a number
|
2017-04-25 12:05:51 +08:00
|
|
|
|
|
|
|
# string repeat -m notanumber "foo"
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Argument 'notanumber' is not a number
|
2017-04-25 12:05:51 +08:00
|
|
|
|
|
|
|
# echo "stdin" | string repeat -n1 "and arg"
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Too many arguments
|
2017-04-25 12:05:51 +08:00
|
|
|
|
|
|
|
# string repeat -n
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Expected argument
|
2017-04-25 12:05:51 +08:00
|
|
|
|
|
|
|
# string repeat -l fakearg 2>&1
|
2017-03-07 22:39:21 +08:00
|
|
|
string repeat: Unknown option '-l'
|
2017-07-14 11:36:59 +08:00
|
|
|
Standard input (line 352):
|
2017-04-25 12:05:51 +08:00
|
|
|
string repeat -l fakearg
|
|
|
|
^
|