printf: remove all uses of length modifiers

Length modifiers are useless. This simplifies the code a bit, results in
more consistency, and allows removing a few PO messages which only
differed in the use of length modifiers.

Closes #11878
This commit is contained in:
Daniel Rainer
2025-10-02 22:10:01 +02:00
committed by Johannes Altmanninger
parent e9f5982147
commit 83af5c91bd
91 changed files with 6138 additions and 6240 deletions

View File

@@ -10,7 +10,7 @@ function funced --description 'Edit function definition'
end
if not set -q argv[1]
printf (_ "%ls: Expected at least %d args, got only %d\n") funced 1 0
printf (_ "%s: Expected at least %d args, got only %d\n") funced 1 0
return 1
end

View File

@@ -17,7 +17,7 @@ function funcsave --description "Save the current definition of all specified fu
end
if not set -q argv[1]
printf (_ "%ls: Expected at least %d args, got only %d\n") funcsave 1 0 >&2
printf (_ "%s: Expected at least %d args, got only %d\n") funcsave 1 0 >&2
return 1
end

View File

@@ -185,11 +185,11 @@ function history --description "display or manipulate interactive command histor
case clear # clear the interactive command history
if test -n "$search_mode"
or set -q show_time[1]
printf (_ "%ls: %ls: subcommand takes no options\n") history $hist_cmd >&2
printf (_ "%s: %s: subcommand takes no options\n") history $hist_cmd >&2
return 1
end
if set -q argv[1]
printf (_ "%ls: %ls: expected %d arguments; got %d\n") history $hist_cmd 0 (count $argv) >&2
printf (_ "%s: %s: expected %d arguments; got %d\n") history $hist_cmd 0 (count $argv) >&2
return 1
end
@@ -214,7 +214,7 @@ function history --description "display or manipulate interactive command histor
builtin history append $search_mode $show_time $max_count $_flag_case_sensitive $_flag_reverse $_flag_null -- $newitem
case '*'
printf "%ls: unexpected subcommand '%ls'\n" $cmd $hist_cmd
printf "%s: unexpected subcommand '%s'\n" $cmd $hist_cmd
return 2
end
end

View File

@@ -15,7 +15,7 @@ if not command -sq open
end
if not set -q argv[1]
printf (_ "%ls: Expected at least %d args, got only %d\n") open 1 0 >&2
printf (_ "%s: Expected at least %d args, got only %d\n") open 1 0 >&2
return 1
end