Commit Graph

237 Commits

Author SHA1 Message Date
Aaron Gyes
461facb42e History: adjust description entries 2021-12-17 15:44:05 -08:00
Aaron Gyes
5ae7bc1443 help: adjust synopsis. history manpage: indent long synopsis lines 2021-12-17 15:38:49 -08:00
Aaron Gyes
50d65ace34 fixup 2021-12-17 15:23:02 -08:00
Aaron Gyes
4c6da2091d Harmonize some idiosyncrancies introduced
For now, we are going with ``command`` for builtins and fish scripts,
and **keyword** for parser keywords like if or and.
2021-12-17 15:20:46 -08:00
Aaron Gyes
af61ea1325 doc_src: Continue the slog through the letter F.
We are using only :: in a synopsis for fishscript examples given
of the command being documented.
2021-12-17 15:16:47 -08:00
Aaron Gyes
5e880bb1c3 Commit doc_src progress.
This is continuing the work I've been doing to remove the ::
formatting for the synopsis sections of our manual pages.
2021-12-17 13:59:39 -08:00
Johannes Altmanninger
b98f71c16f fish_config.rst: make the synopsis imply that "browse" is the default 2021-12-13 20:41:45 +01:00
Aaron Gyes
5e96f817a6
Update command.rst 2021-12-12 00:17:16 -08:00
Andrey Mishchenko
45dbfda5cc Add documentation for nextd-or-forward-word and prevd-or-backward-word readline functions 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
f88bb35204 Fix delete-or-exit doc wording for local consistency 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
bb1955ccf9 Remove delete-or-exit function, which has a C++ implementation 2021-12-11 10:19:18 +01:00
Aaron Gyes
4746137a61 complete synopsis should just be a synopsis. 2021-12-11 00:41:09 -08:00
Aaron Gyes
124734cbaa cd, cdh, command, commandline
Documentation.
2021-12-09 04:45:10 -08:00
Aaron Gyes
3b629d29aa More documentation work 2021-12-09 03:53:13 -08:00
Aaron Gyes
79d1b3e085 slog through documentation
I did.. a and b today.
2021-12-09 03:34:28 -08:00
thibault
ceade1629d builtin commandline: add option to determine if pager is fully disclosed
Use the remaining_to_disclose count to determine if all completions
are shown (allows consistent behavior between short and long completion
lists).

Closes #8485
2021-12-04 22:43:39 +01:00
Andrey Mishchenko
e79617f4b7 Add documentation for prompt_hostname 2021-12-04 10:37:49 +01:00
Andrey Mishchenko
bea86f04c7 Lowercase command description for consistency 2021-12-04 10:37:49 +01:00
Andrey Mishchenko
a3bf41223e Reword documentation for filename in man status 2021-12-04 10:32:15 +01:00
Fabian Homborg
47e45704b1
Allow set --query to check for pathvarness (#8494)
Currently,

    set -q --unpath PATH

simply ignores the "--unpath" bit (and same for "--path").

This changes it, so just like exportedness you can check pathness.
2021-11-26 18:29:10 +01:00
Johannes Altmanninger
41be9fa9fd Clarify that optional option arguments must have no separating space
Unless we use "complete --require-parameter", we must say "-w32",
not "-w 32", because the second "32" is a positional argument.

Notably, old options do not have this behavior, which is a bit weird,
see #8465

Taken from a discussion in #8459
2021-11-26 18:05:29 +01:00
Fabian Homborg
f2fd30df03
Make fish_key_reader's output simpler (#8467)
* fish_key_reader: Simplify default output

It now only prints the bind statement. Timing information and such is
relegated to a separate "verbose" mode.

* Adjust fish_key_reader docs

* Adjust tests
2021-11-22 17:22:22 +01:00
Johannes Altmanninger
4657ac0a7c builtin complete: document that old-style option args can be given after =
Fixes #8457
2021-11-19 05:59:17 +01:00
Johannes Altmanninger
0acbbfe2ca Document that a for-loop passes through any exit status
Unlike in other shells, for-loops do not set $status if
1. the loop count is zero, or if
2. the loop body consists of only commands like "set" that don't
   set $status.

POSIX for-loops always set an exit status (they set 0 if no loop
iterations). Following that would be awkward because it would add a
lot of complexity in combination with the 2 special cases above.

Document that "for" behaves the same as "set": it will pass through
existing $status, and also the last child's $status.

See the discussion in #8409
2021-11-18 15:06:12 +01:00
Emily Seville
3c4969fc38 Change "while" command title to match "for" one
Closes #8409
2021-11-18 14:54:46 +01:00
ridiculousfish
88a89d0a52 docs: remove an errant space 2021-11-14 13:40:02 -08:00
Fabian Homborg
57eccb7e1e docs: Readd note about the command to realpath 2021-11-12 18:28:35 +01:00
Fabian Homborg
edc09c8419 Docs: Switch back to vanilla :ref: for commands that should be linked
Unfortunately, currently :program: doesn't link to the program's page.

So we use the old-school :ref: again where we should link, i.e. for
everything that's not the program the current page is about.

Fixes #8438
2021-11-12 18:02:56 +01:00
Aaron Gyes
7a8fce6941 Thwart more dastardly schemes
thanks @faho
2021-11-12 04:52:38 -08:00
Aaron Gyes
e6eb049aeb Remove imperialist sabotage to previous commit
Juche!
2021-11-12 04:39:11 -08:00
Aaron Gyes
ac1df310c8 Long march towards more structured text 2021-11-12 04:22:35 -08:00
Aaron Gyes
94890c28d3 Underline links. Use CSS to add $ to envvar links 2021-11-06 14:09:27 -07:00
Aaron Gyes
c5e02206d3 Fix up the _PATH ref.
So, it looks like even without -n `sphinx` will report on refs
are bad.

Closes #8407
2021-11-05 16:21:01 -07:00
Aaron Gyes
3078d0a252 fish documentation manpages: omit NAME for non-commands
Documents like fish-tutorial don't need the NAME portion below.

(they also shoudln't be in section 1! These should be section 7,
they aren't for programs.)

the manpage writer will skip NAME if given an empty sstring as
the description.

--

FISH-TUTORIAL(1)     fish-shell     FISH-TUTORIAL(1)

NAME
       fish-tutorial - fish-shell tutorial
2021-11-05 07:50:30 -07:00
Aaron Gyes
d54c8a42a9 Documentation WIP:
Start doing the envvar:: directives and cut some copy. These should
be linking up now.
2021-11-05 05:14:02 -07:00
Aaron Gyes
0803a8fc3e Remove Copyright sectionf from doc pages, and a couple missing bits
... from fish.rst
2021-11-04 13:27:52 -07:00
Aaron Gyes
42239d4dd8 fish.rst: do better
This fixes the indentation problem for the SYNOPSIS section by not
inserting the :: literal block. Format it the same way Sphinx does
their own manpages for commands.

Use more semantic markup, like :command:, so that commands are
highlighted in the man pages.

Split by sentence to give `man` a chance to ascertain lines.

Long-term, it should be possible to teach Sphinx to turn :command:s
into references and get us automatic links to articles for matching
cmds/*.
2021-11-04 13:16:13 -07:00
Fabian Homborg
ea40c1e9de docs: Add missing backticks
This turned `\n` into `n`.
2021-11-04 15:21:28 +01:00
Fabian Homborg
aef6cc1538 docs: Hand-write a list of short descriptions in commands
This is more readable than the full list, especially for the important
things.
2021-10-23 16:46:15 +02:00
Erik Serrander
049104e8df Adds sub-command clear-session to history command.
Issue #5791
This clears all history for the current session. Documentation and
autocompletion for the new subcommand is added.
2021-10-17 19:27:46 -07:00
Adam Skoufis
d619d79117
Fix typo in set_colors command documentation (#8321)
* Fix typo in `set_colors` command documentation
* Replace `It` with `VALUE` to reduce ambiguity
2021-09-29 08:17:21 -07:00
Aaron Gyes
ed8c78c0ea Update docs, completions for funcsave
Remove long opt for -q, funcsave does not have so many options that
it's any help.
2021-09-29 03:08:10 -07:00
Fabian Homborg
45714eb29d Add function scope to read as well
Fixes #8295.
2021-09-23 17:12:37 +02:00
Adam Skoufis
1ff6160058 Fix typo in abbr docs 2021-09-09 15:13:17 +02:00
David Adam
8dd4c67db1 funcsave: edit the whole file containing a function
Many functions ship in files with helper functions, and it is useful to
edit those too.

Closes #391.
2021-08-16 21:45:22 +08:00
David Adam
a40e60b45b funced: minor grammar fixes to documentation 2021-08-16 21:44:43 +08:00
Fabian Homborg
c4593828f4
commandline: Add --is-valid option (#8142)
* commandline: Add --is-valid option to query whether it's syntactically complete

This means querying when the commandline is in a state that it could
be executed. Because our `execute` bind function also inserts a
newline if it isn't.

One case that's not handled right now: `execute` also expands
abbreviations, those can technically make the commandline invalid
again.

Unfortunately we have no real way to *check* without doing the
replacement.

Also since abbreviations are only available in command position when
you _execute_ them the commandline will most likely be valid.

This is enough to make transient prompts work:

```fish
function reset-transient --on-event fish_postexec
    set -g TRANSIENT 0
end

function maybe_execute
    if commandline --is-valid
        set -g TRANSIENT 1
        commandline -f repaint
    else
        set -g TRANSIENT 0
    end
    commandline -f execute
end

bind \r maybe_execute
```

and then in `fish_prompt` react to $TRANSIENT being set to 1.
2021-08-14 11:29:22 +02:00
Fabian Homborg
eee38836cf set -q: Return 255 if no variable name was passed
Previously this strictly returned the number of unset variables. So if
no variable was given, it would return *true*, which is highly
suspect.
2021-08-14 10:55:21 +02:00
Johannes Altmanninger
cb3f3480b2 Fix punctuation in footnote 2021-08-10 21:01:39 +02:00
Fabian Homborg
b10d64e22e prompt_pwd: Update docs 2021-08-09 17:42:00 +02:00