mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 04:43:10 +00:00
Support wide characters in printf %c
This commit is contained in:
parent
fe9cf673a2
commit
a4059d3e60
3 changed files with 3 additions and 0 deletions
|
@ -467,6 +467,7 @@ void builtin_printf_state_t::print_direc(const wchar_t *start, size_t length, wc
|
||||||
fmt.append(L"L");
|
fmt.append(L"L");
|
||||||
break;
|
break;
|
||||||
case L's':
|
case L's':
|
||||||
|
case L'c':
|
||||||
fmt.append(L"l");
|
fmt.append(L"l");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -4,6 +4,7 @@ printf "%x %X %o %llu\n" 10 11 8 -1
|
||||||
printf "%a %A\n" 14 15
|
printf "%a %A\n" 14 15
|
||||||
|
|
||||||
printf "%c %s\n" a hello
|
printf "%c %s\n" a hello
|
||||||
|
printf "%c%c%c\n" hello … o
|
||||||
printf "%e %E\n" 5 6
|
printf "%e %E\n" 5 6
|
||||||
|
|
||||||
printf "%20d\n" 50
|
printf "%20d\n" 50
|
||||||
|
|
|
@ -2,6 +2,7 @@ Hello 1 2 3.000000 4.000000 5 6
|
||||||
a B 10 18446744073709551615
|
a B 10 18446744073709551615
|
||||||
0xep+0 0XFP+0
|
0xep+0 0XFP+0
|
||||||
a hello
|
a hello
|
||||||
|
h…o
|
||||||
5.000000e+00 6.000000E+00
|
5.000000e+00 6.000000E+00
|
||||||
50
|
50
|
||||||
5 10
|
5 10
|
||||||
|
|
Loading…
Reference in a new issue