fish-shell/doc_src/cmds
Fabian Homborg 4785440f65
Add an "_" builtin to call into gettext (#7036)
* Add an "_" builtin to call into gettext

We already have gettext in C++ (if available), so it seems weird to
fork off a command to start it from script.

This is only for fish's own translations. There's no way to call into
other catalogs, it just translates all arguments separately.

This is faster by a factor of ~1000, which allows us to call
translations much more, especially from scripts.

E.g. making fish_greeting global by default would hurt cost-wise,
given that my fish starts up in 8ms and just calling the current `_`
function takes 2ms, and that would have two calls.

Incidentally, this also makes us rely on a weirdly defined function
less, so it:
Fixes #6804.

* docs: Add `_` docs

Let's see if that filename works out.

* Reword _ docs
2020-05-29 20:53:44 +02:00
..
_.rst Add an "_" builtin to call into gettext (#7036) 2020-05-29 20:53:44 +02:00
abbr.rst doc(abbr): adjust token names 2020-02-23 21:36:55 +08:00
alias.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
and.rst doc: add interlinks between true ←→ false and and ←→ or cmds 2020-02-23 23:41:16 -08:00
argparse.rst docs: Fix repeated word in argparse documentation 2020-03-25 18:23:19 +01:00
begin.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
bg.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
bind.rst docs/bind: Overhaul 2020-05-18 20:48:36 +02:00
block.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
break.rst doc: add interlinks between break and continue commands 2020-03-09 19:24:38 +01:00
breakpoint.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
builtin.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
case.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
cd.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
cdh.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
command.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
commandline.rst docs: Remove extra colon to fix formatting 2020-04-17 22:29:12 +02:00
complete.rst docs: don't quote code snippets 2020-04-13 22:56:22 +02:00
contains.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
continue.rst doc: add interlinks between break and continue commands 2020-03-09 19:24:38 +01:00
count.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
dirh.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
dirs.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
disown.rst docs: Link builtins 2020-03-21 15:31:25 +01:00
echo.rst doc: add interlinks between echo ←→ printf commands 2020-03-03 20:01:48 +01:00
else.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
emit.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
end.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
eval.rst doc: add links to 'source' command from 'eval' and 'functions' 2020-03-21 13:21:38 +01:00
exec.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
exit.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
false.rst doc: add interlinks between true ←→ false and and ←→ or cmds 2020-02-23 23:41:16 -08:00
fg.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_add_path.rst Add fish_add_path, a simple way to add to $PATH 2020-05-29 20:51:05 +02:00
fish_breakpoint_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_config.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_git_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_hg_prompt.rst Make default hg prompt leaner 2020-03-07 13:02:58 +01:00
fish_indent.rst Add fish debugging examples 2020-05-19 21:07:33 +02:00
fish_key_reader.rst docs: Add completions for fish_key_reader 2020-04-19 07:06:31 +02:00
fish_mode_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_opt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_right_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_svn_prompt.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
fish_update_completions.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
fish_vcs_prompt.rst Disable svn prompt by default 2020-03-01 17:04:02 +01:00
fish.rst Add fish debugging examples 2020-05-19 21:07:33 +02:00
for.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
funced.rst docs: Fix spacing on key combinations 2020-03-21 13:20:34 +01:00
funcsave.rst Funcsave with --directory option (#7041) 2020-05-27 20:13:44 +02:00
function.rst docs: Add fish_posterror 2020-04-25 09:25:03 +02:00
functions.rst doc: add links to 'source' command from 'eval' and 'functions' 2020-03-21 13:21:38 +01:00
help.rst docs: Link builtins 2020-03-21 15:31:25 +01:00
history.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
if.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
isatty.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
jobs.rst docs: Link builtins 2020-03-21 15:31:25 +01:00
math.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
nextd.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
not.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
open.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
or.rst doc: add interlinks between true ←→ false and and ←→ or cmds 2020-02-23 23:41:16 -08:00
popd.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
prevd.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
printf.rst printf: Overhaul docs 2020-05-18 20:48:36 +02:00
prompt_pwd.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
psub.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
pushd.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
pwd.rst doc: add section about directory history / stack 2020-04-18 10:40:48 +02:00
random.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
read.rst doc: add links between the string-split and read commands 2020-03-10 18:25:40 +01:00
realpath.rst doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
return.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
set_color.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
set.rst Update set --show docs 2020-04-26 17:55:17 +02:00
source.rst docs: don't quote code snippets 2020-04-13 22:56:22 +02:00
status.rst docs: Use underscore in argument placeholder 2020-04-17 22:29:12 +02:00
string-collect.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-escape.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-join.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-join0.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-length.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-lower.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-match.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-repeat.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-replace.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-split.rst Fix string split docs 2020-04-21 18:36:56 +02:00
string-split0.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-sub.rst Add string sub --end (#6765) 2020-03-22 15:53:09 +01:00
string-trim.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-unescape.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string-upper.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
string.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
suspend.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
switch.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
test.rst Doc: Fix dead link to POSIX man page "test". 2020-04-19 04:25:04 +02:00
time.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
trap.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
true.rst doc: add interlinks between true ←→ false and and ←→ or cmds 2020-02-23 23:41:16 -08:00
type.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
ulimit.rst docs: Link builtins 2020-03-21 15:31:25 +01:00
umask.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
vared.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
wait.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
while.rst We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00