diff --git a/share/functions/_.fish b/share/functions/_.fish index 3c58a73bc..ee4e25b37 100644 --- a/share/functions/_.fish +++ b/share/functions/_.fish @@ -1,7 +1,16 @@ # # Alias for gettext or a fallback if gettext isn't installed. # -if command -sq gettext +# Use ggettext if available. +# This is the case on OpenIndiana, where the default gettext +# interprets `\n` itself, so +# printf (_ 'somemessage\n') +# won't print a newline. +if command -sq ggettext + function _ --description "Alias for the ggettext command" + command ggettext fish $argv + end +else if command -sq gettext function _ --description "Alias for the gettext command" command gettext fish $argv end