Commit Graph

61 Commits

Author SHA1 Message Date
Fabian Homborg
b6eddc75bc docs: Remove -# formatting
That was supposed to be displayed like a list item, but it's displayed
verbatim in the html output at least, so it looks weird.

[ci skip]
2019-06-06 19:14:11 +02:00
Fabian Homborg
4ebb6cf39e complete: Add "--force-files"
This allows a completion to specify that *it* takes files.

Useful for things like `sudo -e`, because sudo usually doesn't take
any files.
2019-05-30 19:13:42 +02:00
Fabian Homborg
97507a24a2 Increase default read limit to 100MiB
Someone has hit the 10MiB limit (and of course it's the number of
javascript packages), and we don't handle it fantastically currently.

And even though you can't pass a variable of that size in one go, it's
plausible that someone might do it in multiple passes.

See #5267.
2019-05-29 11:01:45 +02:00
ridiculousfish
63a16befd4 Introduce the fish log, a replacement for debug()
This adds a new mechanism for logging, intended to replace debug().

The entry points are FLOG and FLOGF. FLOG can be used to log a sequence of
arguments, FLOGF is for printf-style formatted strings.

Each call to FLOG and FLOGF requires a category. If logging for a category
is not enabled, there is no effect (and arguments are not evaluated).

Categories may be enabled on the command line via the -d option.
2019-05-27 17:24:52 -07:00
Fabian Homborg
c2b7e9b2e6 fish_indent: Allow multiple file arguments
Allows `fish_indent -w **.fish` to restyle all fish files under the
current directory.

(This also has the sideeffect of reducing style.fish time by ~10s, as
we only need to invoke `fish_indent` once, instead of once per-file)
2019-05-20 21:04:51 +02:00
Fabian Homborg
257c72d8be Document string split superpowers more
[ci skip]
2019-05-19 19:40:48 +02:00
Fabian Homborg
6e0cf5db6f docs/status: Fix synopsis
[ci skip]
2019-05-14 19:26:52 +02:00
Fabian Homborg
0aead5caf8 Repaint-mode to reexecute the rest if mode-prompt output is empty
We previously checked if fish_mode_prompt existed as a function, but
that's a bad change for those who already set it to an empty function
to have a mode display elsewhere.
2019-05-14 19:26:52 +02:00
Fabian Homborg
3262c5ff44 docs: Document that complete -k does last calls first
Fixes #5868.

[ci skip]
2019-05-10 15:39:17 +02:00
Fabian Homborg
8d9782301e docs: Call "arrays" "lists"
We were flip-flopping between the two terms, so we now use one. We
still mention "array" in the chapter, and it's still `read --array`,
though.

Fixes #5846.

[ci skip]
2019-05-05 14:01:07 +02:00
Fabian Homborg
05b2d4ee54 Docs: Document path vars more
Fixes #5741.

[ci skip]
2019-04-30 13:18:56 +02:00
Fabian Homborg
1377f71331 docs: Remove some more html
See #5696.

[ci skip]
2019-04-30 12:56:30 +02:00
Fabian Homborg
d8f922fd70 docs: Remove <outp> tags
fish_indent_lexer formats lines not starting with a prompt indicator
as output, as long as there is a prompt indicator elsewhere.

So these tags are useless and wrong.

See #5696.

[ci skip]
2019-04-30 12:44:55 +02:00
Fabian Homborg
8c9359fdd4 src/builtin_argparse: Add --ignore-unknown flag
This keeps all unknown options in $argv, so

```fish
argparse -i a/alpha -- -a banana -o val -w
```

results in $_flag_a set to banana, and $argv set to `-o val -w`.

This allows users to use multiple argparse passes, or to simply avoid
specifying all options e.g. in completions - `systemctl` has 46 of
them, most not having any effect on the completions.

Fixes #5367.
2019-04-29 15:57:56 +02:00
Fabian Homborg
af0e08e9f1 argparse: Use the current function name by default
This makes the `--name` option usually unnecessary.

See #5835.
2019-04-27 15:55:49 +02:00
Fabian Homborg
eb0e0a4ab4 docs/argparse: Fix links
Fixes #5847.

[ci skip]
2019-04-27 12:16:53 +02:00
Fabian Homborg
e084d097d5 docs: Remove <asis> markup
This isn't needed anymore.

[ci skip]
2019-04-26 19:25:30 +02:00
Fabian Homborg
ff62f2ae08 docs/bind: Document path-component and word
Plus fix some formatting.

[ci skip]
2019-04-26 19:23:24 +02:00
David Gowers
38cadc9d4f Variables as commands are in fact supported, eval docs should not claim otherwise. (#5819)
Provide an example that somewhat justifies eval's existence in light of this change.

Also correct similar misinformation found in a comment.
2019-04-26 15:30:13 +02:00
David Adam
87518a524f docs: update the VCS prompt function documentation
Edited for clarity and formatting.

[ci skip]
2019-04-11 23:51:47 +08:00
ridiculousfish
b6555a0dc4 Add print-rusage-self to fish
This adds an option --print-rusage-self to the fish executable. When set,
this option prints some getrusage stats to the console in a human-readable
way. This will be used by upcoming benchmarking support.
2019-04-10 14:33:45 -07:00
Fabian Homborg
c2259cbb86 docs: Fix typo
Also removes a warning.

[ci skip]
2019-04-09 13:47:54 +02:00
Fabian Homborg
f1614a995a docs: Reword commandline -f
We don't refer to "readline functions" anywhere else, and "injecting"
them "into the reader" is an overly jargony way of expressing it that
only makes sense to someone familiar with the internals. And even then
the term "readline" is already taken by the "readline" library, used
by bash et al, but not by us.

So we pick the term "input functions", like we did in bind.

See https://stackoverflow.com/questions/55542839/what-does-commandline-f-repaint-in-fish-shell/55543411#55543411.

[ci skip]
2019-04-06 20:39:16 +02:00
Fabian Homborg
21ef9f5150 docs: Remove fish_vi_mode documentation
This has been deprecated for quite a while, no need to keep the docs around.

[ci skip]
2019-04-05 14:09:41 +02:00
Fabian Homborg
318fe3c046 docs/string: Replace doesn't do globs
As a bit of weirdness in string's design, replace does literal
matching (`*` aren't expanded) by default, not globs.

[ci skip]
2019-04-03 19:49:38 +02:00
Fabian Homborg
aa3dff098c docs/string: Add paragraph on comparison with unix tools
[ci skip]
2019-04-02 12:46:23 +02:00
Fabian Homborg
99dd6d7394 Let repaint-mode act like a repaint if no fish_mode_prompt exists
Otherwise I'm pretty sure we'd get complaints from people who use a
mode-indicator elsewhere in their prompts.
2019-04-01 16:04:14 +02:00
Fabian Homborg
8ff866b26b Add repaint-mode bind function
If we switch the bind mode, we add a "force-repaint" there just to
redraw the mode indicator.

That's quite wasteful and annoying, considering that sometimes the prompt can take
half a second.

So we add a "repaint-mode" function that just reexecutes the
mode-prompt and uses the cached values for the others.

Fixes #5783.
2019-04-01 15:59:39 +02:00
Fabian Homborg
0d72912641
Expand abbr explicitly (#5762)
* Add "expand-abbr" bind function

This can be used to explictly allow expanding abbreviations.

* Make expanding abbr explicit

NOTE: This accepts them for space only, we currently also do it for \n
and \r.

* Remove now dead code

We no longer trigger an abbr implicitly, so we can remove the code
that does it.

* Fix comment

[ci skip]
2019-04-01 15:59:15 +02:00
Fabian Homborg
95ab71c456 docs: Another bit of dehtml-izing
[ci skip]
2019-03-31 12:00:27 +02:00
Fabian Homborg
ac61d3f34d docs: More references
Including two more href.
2019-03-31 11:48:35 +02:00
Fabian Homborg
127c0e9764 docs: Fix remaining references
Fixes #5775.
2019-03-31 11:35:02 +02:00
Fabian Homborg
e2cf10dd4f docs: More command labels
[ci skip]
2019-03-31 11:28:13 +02:00
Fabian Homborg
86d4574222 docs: Use more command labels 2019-03-31 11:24:04 +02:00
Fabian Homborg
cb94dd4d30 docs: Use command labels
[ci skip]
2019-03-31 11:15:57 +02:00
Fabian Homborg
cf9b8fa3fa docs: Add labels to all commands
This allows us to use :ref: references, which don't require hardcoding
it as html

[ci skip]
2019-03-31 11:05:33 +02:00
Fabian Homborg
c693687812 docs: Add missing >
"Anonymous hyperlink" strikes again!

[ci skip]
2019-03-31 10:55:17 +02:00
Fabian Homborg
0c4580d874 docs: Fix moar reference syntax 2019-03-30 20:44:07 +01:00
Fabian Homborg
191b74df6f docs: Fix some sphinx errors
See #5696.

[ci skip]
2019-03-29 20:55:28 +01:00
Fabian Homborg
3912d86ed8 docs/cmds/bind: Fix synopsis 2019-03-29 20:16:10 +01:00
Fabian Homborg
408c555bd6 docs/cmds/alias: Fix emphasis 2019-03-29 20:15:59 +01:00
Fabian Homborg
21bac8428e docs/cmds/string: Fix lists
sphinx _really_ likes its empty lines before lists!

[ci skip]
2019-03-29 20:12:28 +01:00
Fabian Homborg
b8570a9e8a docs/cmds/string: Improve synopsis
This both formats it as a code-block, and adds the synopsis of each
subcommand to the corresponding section again so you don't need to
scroll back-and-forth so much.

[ci skip]
2019-03-29 20:11:23 +01:00
Fabian Homborg
6cf61d5235 docs/fish_git_prompt: Fix formatting
Sphinx likes empty lines before lists.

Also give variable names the ``treatment``.

[ci skip]
2019-03-28 22:11:28 +01:00
Fabian Homborg
c94fe0f8c9 docs/fish_git_prompt: Document default settings
This should help with interpreting the results.

All this is quite convoluted, especially with defaults dependent on
other settings.

[ci skip]
2019-03-28 21:16:05 +01:00
Fabian Homborg
b86200938f Always use "." for cd
Nobody doesn't want to use $PWD to cd, so if $CDPATH does not include
it that was a mistake.

Bash also appends "." here.

Fixes #4484.
2019-03-26 10:11:36 +01:00
Fabian Homborg
848d538f08 docs: Replace @key markup with :kbd:
The best I could find. It doesn't currently appear to render in the
html, but it's better than showing `@key{thing}`.
2019-03-24 19:59:23 +01:00
Fabian Homborg
295286b184 docs: Fix remaining "\subsection" markup
See #5696.

[ci skip]
2019-03-24 19:44:56 +01:00
Fabian Homborg
f8b88d5b98 docs/fish_git_prompt: Better document variables
More accurate, also the code example can now be copy-pasted.

[ci skip]
2019-03-19 21:07:49 +01:00
Fabian Homborg
e7a964fdfa [count] Allow counting lines from stdin
As a simple replacement for `wc -l`.

This counts both lines on stdin _and_ arguments.

So if "file" has three lines, then `count a b c < file` will print 6.

And since it counts newlines, like wc, `echo -n foo | count` prints 0.
2019-03-15 14:31:36 +01:00