diff --git a/po/de.po b/po/de.po index 5c4a2439a..5bef898fa 100644 --- a/po/de.po +++ b/po/de.po @@ -155,10 +155,6 @@ msgstr "" msgid "%s, version %s\n" msgstr "%s, version %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "" - #, c-format msgid "%s: %s\n" msgstr "" diff --git a/po/en.po b/po/en.po index 1b04e2404..78184556f 100644 --- a/po/en.po +++ b/po/en.po @@ -153,10 +153,6 @@ msgstr "" msgid "%s, version %s\n" msgstr "%s, version %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "" - #, c-format msgid "%s: %s\n" msgstr "" diff --git a/po/fr.po b/po/fr.po index 38907eac6..1e9eab368 100644 --- a/po/fr.po +++ b/po/fr.po @@ -284,10 +284,6 @@ msgstr "%s, version %s" msgid "%s, version %s\n" msgstr "%s, version %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "%s : %*s\n" - #, c-format msgid "%s: %s\n" msgstr "%s : %s\n" diff --git a/po/pl.po b/po/pl.po index ab2cfaacd..ab905fcb1 100644 --- a/po/pl.po +++ b/po/pl.po @@ -149,10 +149,6 @@ msgstr "" msgid "%s, version %s\n" msgstr "%s, wersja %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "" - #, c-format msgid "%s: %s\n" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index 26028ccb9..68b33c31d 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -154,10 +154,6 @@ msgstr "" msgid "%s, version %s\n" msgstr "%s, versão %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "" - #, c-format msgid "%s: %s\n" msgstr "" diff --git a/po/sv.po b/po/sv.po index 6f7669d2f..3d122d1a7 100644 --- a/po/sv.po +++ b/po/sv.po @@ -150,10 +150,6 @@ msgstr "" msgid "%s, version %s\n" msgstr "%s, version %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "" - #, c-format msgid "%s: %s\n" msgstr "" diff --git a/po/zh_CN.po b/po/zh_CN.po index 497ddbf4c..9028dea99 100644 --- a/po/zh_CN.po +++ b/po/zh_CN.po @@ -176,10 +176,6 @@ msgstr "%s,版本 %s" msgid "%s, version %s\n" msgstr "%s,版本 %s\n" -#, c-format -msgid "%s: %*s\n" -msgstr "%s: %*s\n" - #, c-format msgid "%s: %s\n" msgstr "%s: %s\n" diff --git a/po/zh_TW.po b/po/zh_TW.po index 2cdf3a9a8..8bba47bbf 100644 --- a/po/zh_TW.po +++ b/po/zh_TW.po @@ -149,10 +149,6 @@ msgstr "%s,%s 版" msgid "%s, version %s\n" msgstr "%s,%s 版\n" -#, c-format -msgid "%s: %*s\n" -msgstr "%s:%*s\n" - #, c-format msgid "%s: %s\n" msgstr "%s:%s\n" diff --git a/src/builtins/abbr.rs b/src/builtins/abbr.rs index 816a72d5f..f4e52a1b4 100644 --- a/src/builtins/abbr.rs +++ b/src/builtins/abbr.rs @@ -353,8 +353,12 @@ fn abbr_add(opts: &Options, streams: &mut IoStreams) -> BuiltinResult { if let Some(offset) = error.offset() { streams .err - .append(wgettext_fmt!("%s: %s\n", CMD, regex_pattern.as_utfstr())); - streams.err.append(sprintf!("%s: %*s\n", CMD, offset, "^")); + .append(sprintf!("%s: %s\n", CMD, regex_pattern.as_utfstr())); + // TODO: This is misaligned if `regex_pattern` contains characters which are not + // exactly 1 terminal cell wide. + let mut marker = " ".repeat(offset.saturating_sub(1)); + marker.push('^'); + streams.err.append(sprintf!("%s: %s\n", CMD, marker)); } return Err(STATUS_INVALID_ARGS); } diff --git a/src/builtins/string.rs b/src/builtins/string.rs index d2ea05165..58bf06696 100644 --- a/src/builtins/string.rs +++ b/src/builtins/string.rs @@ -187,7 +187,11 @@ fn print_error(&self, args: &[&wstr], streams: &mut IoStreams) { &WString::from(e.error_message()) ); string_error!(streams, "%s: %s\n", cmd, pattern); - string_error!(streams, "%s: %*s\n", cmd, e.offset().unwrap_or(0), "^"); + // TODO: This is misaligned if `pattern` contains characters which are not exactly 1 + // terminal cell wide. + let mut marker = " ".repeat(e.offset().unwrap_or(0).saturating_sub(1)); + marker.push('^'); + string_error!(streams, "%s: %s\n", cmd, marker); } InvalidCaptureGroupName(name) => { streams.err.append(wgettext_fmt!(