Commit graph

1716 commits

Author SHA1 Message Date
Fabian Boehm
886b4b92b2 docs/abbr: Explain ctrl-space
This is now more important because we have regexes and global abbrs
2022-12-13 18:32:56 +01:00
ridiculousfish
b2ee9c73e1 Call out more forcefully that abbreviations are interactive only 2022-12-10 16:29:46 -08:00
ridiculousfish
d8dbb9b259 Switch abbreviation '-r' flag from --rename to --regex
This will be the more common option and provides consistency with
`string`.
2022-12-10 16:21:39 -08:00
ridiculousfish
e08f4db1f9 Rename abbreviation cursor "sentinel" to "marker"
Also default the marker to '%'. So you may write:

    abbr -a L --position anywhere --set-cursor "% | less"

or set an explicit marker:

   abbr -a L --position anywhere --set-cursor=! "! | less"
2022-12-10 16:15:03 -08:00
ridiculousfish
01039537b0 Remove abbreviation triggers
Per code review, this does not add enough value to introduce now.
Leaving the feature in history should want want to revisit this
in the future.
2022-12-10 16:15:00 -08:00
ridiculousfish
35a4688650 Rename abbreviation triggers
This renames abbreviation triggers from `--trigger-on entry` and
`--trigger-on exec` to `--on-space` and `--on-enter`. These names are less
precise, as abbreviations trigger on any character that terminates a word
or any key binding that triggers exec, but they're also more human friendly
and that's a better tradeoff.
2022-12-10 15:38:50 -08:00
ridiculousfish
5841e9f712 Remove '--quiet' feature of abbreviations
Per code review, this is too risky to introduce now. Leaving the feature
in history should want want to revisit this in the future.
2022-12-10 15:38:50 -08:00
ridiculousfish
22bd43f9d5 Document new abbreviation features 2022-12-10 15:38:50 -08:00
ridiculousfish
1402bae7f4 Re-implement abbreviations as a built-in
Prior to this change, abbreviations were stored as fish variables, often
universal. However we intend to add additional features to abbreviations
which would be very awkward to shoe-horn into variables.

Re-implement abbreviations using a builtin, managing them internally.

Existing abbreviations stored in universal variables are still imported,
for compatibility. However new abbreviations will need to be added to a
function. A follow-up commit will add it.

Now that abbr is a built-in, remove the abbr function; but leave the
abbr.fish file so that stale files from past installs do not override
the abbr builtin.
2022-12-10 15:29:03 -08:00
Fabian Boehm
d640e0d0d6 docs/language: Some slight tweaks
It reads nicer to not have the "see also" thing right in the first
paragraph. I'm not even done reading this, why are you sending me
elsewhere?

(of course if it's a hotlink on a specific word that's different)
2022-12-07 21:47:00 +01:00
Fabian Boehm
02e11773ad docs/css: Make h4s visible
Otherwise this just looks like normal text. Same size as h3 for now,
we might want to think about another indicator - underlines?
background color?
2022-12-07 21:47:00 +01:00
Fabian Boehm
e34f0e7c9f docs: Add some more envvars to reference
(and fix a couple of references)
2022-12-01 18:00:06 +01:00
Fabian Boehm
65a00c80b3 docs: Explain what times output means 2022-12-01 17:56:57 +01:00
Fabian Boehm
e551f93f6d docs/set: Don't hide -u so much
It's fine if it doesn't show up in the synopsis above, but putting it
under "Notes" is just too awkward.

It's a short option that exists, and so it should be documented.
2022-11-10 11:34:50 +01:00
Aaron Gyes
6859a4c6f6 add missing space 2022-11-09 18:42:44 -08:00
Aaron Gyes
154b809c98 html docs: Make prompt (> ) portion of example code unselectable
It goofs up copy-and-pasting. Really annoying, especially
if there are multiple lines.
2022-11-09 18:31:04 -08:00
Aaron Gyes
c107b57562 fixup unintentional NOTES newline 2022-11-09 18:04:44 -08:00
Aaron Gyes
32e770a4c2 set docs: improve syopsis, fix formatting, hide -u
I tried to make the synopsis a little less theoretical with
the placeholders and instead introduced the actual scope
options, long and short once, then refer to them as -Uflg from
then on.

I mentioned that list indicies are accepted / work to erase stuff.

In the list of options, we pretend like --unexport is long-only.
Especially with --unpath and --path, and what would go wrong
if one confused it with --univeral, and how rarely it's used,
I think it's better this way. I mention it as a synonym later
in the document so that it's not literally undocumented.

Changed phrasing such as:

"Causes the specified shell variable to be given a global scope"

Which can be read as we are taking a shell variable that exists
and giving it global scope, upgrading it to global (retaining
the value).

Redid the example section using the > syntax for things entered
into a prompt, with shell output following. The explanatory

Added in missing newlines at the ends of sentences.
2022-11-09 17:50:48 -08:00
Mahmoud Al-Qudsi
37b0f4dabc Document escape of new lines
I'm not sure if line continuations are covered anywhere else in the docs, but I
think the escapes section of the language page is a good place to mention them.
2022-11-09 13:01:09 -06:00
Mahmoud Al-Qudsi
6ac18defd2 Add status current-commandline
Makes it possible to retrieve the currently executing command line as
opposed to the currently executing command (`status current-command`).

Closes #8905.
2022-10-26 12:15:02 -05:00
Mahmoud Al-Qudsi
e3c67ae229 Reword debugging section in language docs
- Clean up the wording a little.
- Highlight the limitations of the "debugger" more clearly and don't mislead
  people into thinking it's possible to really interactively set/remove
  breakpoints except in select circumstances.

Sidenote: I can't believe we're using a markup language that doesn't support
nested inline markup. What a crying shame, rST!
2022-10-23 12:51:12 -05:00
Fabian Boehm
23b5390a0c docs: Mention --profile 2022-10-23 13:43:02 +02:00
Fabian Boehm
4001e2fe19 docs: Mention function name restriction in "identifiers" 2022-10-23 13:39:44 +02:00
Fabian Boehm
358214938a docs: Don't double-document --argument-names 2022-10-23 13:36:56 +02:00
Fabian Boehm
5ba9c7c2ca docs: Move event documentation to the events section
This was a bit awkward in the function page.
2022-10-23 11:39:13 +02:00
Fabian Boehm
8c362c89b5
git prompt: Interpret values of "1", "yes" or "true" as true for bools instead of relying on defined-or-not (#9274)
This allows explicitly turning these settings off by setting the variable to e.g. 0.

See #7120
2022-10-21 20:22:20 +02:00
Fabian Boehm
a4dc6dcb74 docs: Add some more mentions
We should have more cross-linking and mentions of our builtins and
functions, so people can find the dang things.
2022-10-20 19:33:57 +02:00
Fabian Boehm
b6c1ecb288 docs: Add something on how we find commands 2022-10-20 19:31:18 +02:00
Mahmoud Al-Qudsi
994049d33b Document support for erasing from multiple scopes 2022-10-20 11:21:05 -05:00
Fabian Boehm
2419809a26 Fix formatting for isatty
(this did not recognize `[FILE DESC]` because of the space)
2022-10-19 20:10:26 +02:00
Fabian Boehm
98552817f5 Document fish_clipboard_copy/paste 2022-10-19 20:10:26 +02:00
Fabian Boehm
054f9baf88 Add a fish_delta helper function
This helps figuring out which functions, completions and config you've overridden.
2022-10-19 20:06:35 +02:00
Michael Jarvis
ad696a1ec3
Fix warning 20221018 (#9287)
* Fix Sphinx warning:

../CHANGELOG.rst:2: WARNING: Explicit markup ends without a blank line; unexpected unindent.

* Fix Sphinx warning:

fish-shell/doc_src/language.rst:129: WARNING: Explicit markup ends without a blank line; unexpected unindent.
2022-10-18 18:23:12 +02:00
Mahmoud Al-Qudsi
dd0fd88736 Clarify and expand scope documentation
The function scope was not mentioned at all, even though it can be manually
specified.
2022-10-15 16:04:09 -05:00
Sietse Brouwer
cd91b39675
docs: bind: explain more fully how modes work (#9278)
* docs: bind: explain more fully how modes work

* Fix rst
2022-10-14 18:53:21 +02:00
Fabian Boehm
d7f36fab44 docs: Fix some of the escaping section
No more need to escape `^`, be fancy with the backslash space to make
it actually, you know, render in the output.
2022-10-12 18:18:27 +02:00
Fabian Boehm
1e7a4b076d vi-mode: Bind "/" to history-pager
This is unused currently, so we can just use it here. Ctrl-s as the
inverse stays because that's shared.

Fixes #2271
2022-10-11 17:47:13 +02:00
Fabian Boehm
52dcfe11af Make \x the same as \X
Up to now, in normal locales \x was essentially the same as \X, except
that it errored if given a value > 0x7f.

That's kind of annoying and useless.

A subtle change is that `\xHH` now represents the character (if any)
encoded by the byte value "HH", so even for values <= 0x7f if that's
not the same as the ASCII value we would diverge.

I do not believe anyone has ever run fish on a system where that
distinction matters. It isn't a thing for UTF-8, it isn't a thing for
ASCII, it isn't a thing for UTF-16, it isn't a thing for any extended
ASCII scheme - ISO8859-X, it isn't a thing for SHIFT-JIS.

I am reasonably certain we are making that same assumption in other
places.

Fixes #1352
2022-10-09 15:24:01 +02:00
Fabian Boehm
a99f588328 docs: More on bool flags
Instead of duplicating this, just point above.
2022-10-07 16:11:45 +02:00
Fabian Boehm
e62af43d12 docs: Fix how bool flag vars are set
This was changed for #4226, shortly after argparse was implemented.

Fixes #9265
2022-10-07 15:48:24 +02:00
Fabian Boehm
a4ff61ffa4 docs: Minor formatting fixes 2022-10-06 21:30:13 +02:00
Alexo
88ced9fb0f
docs: remove redundant '$' in read.rst (#9263)
`:envvar:` automatically prepends a `$` before the variable name provided in between the backticks.
2022-10-06 14:29:17 -05:00
Sergei Shilovsky
e274ef6c0d
commandline --selection-start and --selection-end implementation
Fixes #9197
2022-10-05 18:51:00 +02:00
Mahmoud Al-Qudsi
e2d37152ad Move short old-style example to end 2022-10-04 12:56:46 -05:00
Mahmoud Al-Qudsi
57175a80c0 complete docs: When to use old-style for short options
There are many applications with "primitive" argument parsing capabalities that
cannot handle munging two short options together (`-xf` for `-x -f`) or a short
option and its required value (`-dall` for `-d all`). To prevent fish from
suggesting munged arguments/payloads, the options (both long and short, not just
long!) can be specified as `-o` or `--old-option` but none of this is
documented.
2022-10-04 12:56:46 -05:00
Fabian Boehm
8deab8d9ce docs/string: Document shorten return value and --quiet 2022-10-04 18:47:37 +02:00
Fabian Boehm
cb28b39b24 string shorten: Make max of 0 mean no shortening
This makes it easier to just slot in `string shorten` wherever,
without having to do a weird "if test $max -gt 0" check.
2022-10-04 18:44:21 +02:00
Fabian Boehm
a7f3af921f docs: Document type/builtin exit status
Fixes #9252
2022-09-30 18:50:14 +02:00
Fabian Boehm
521dc5c5d0 docs: Explain SIGPIPE and how it relates to $pipestatus 2022-09-30 18:32:43 +02:00
Mahmoud Al-Qudsi
e930dc92b0 Make stylistic grammatical change to complete docs
Use a hyphen when referring to "xxx-style" completions.
2022-09-26 14:08:34 -05:00