Commit Graph

14828 Commits

Author SHA1 Message Date
Aaron Gyes
40a781a89f Use correct types for format specifers
(or use the correct specifiers for the type if we can.)

These are hard to track down because we can't get compile-time
warnings for the wprintf family of in libc like is possible for
the narrow versions.
2021-11-06 17:15:32 -07:00
Aaron Gyes
97245fcd3f fix typo 2021-11-06 14:14:11 -07:00
Aaron Gyes
94890c28d3 Underline links. Use CSS to add $ to envvar links 2021-11-06 14:09:27 -07:00
Aaron Gyes
579d1e190c pygments.css: update colors
Try some nicer greens, and grey for comments in the code blocks.
2021-11-06 14:09:27 -07:00
ridiculousfish
797e3f1ce9 language.rst: clean up redirection docs and mention noclobber + append
Fixes #8380
2021-11-06 13:11:18 -07:00
ridiculousfish
13133f66be docs: remove an errant } from the css file
This was causing strange spacing in the language docs.
2021-11-06 12:30:51 -07:00
Jenn Wheeler
5b5cee5185 vmctl completion function call needs to be quoted 2021-11-06 18:38:53 +01:00
Aaron Gyes
b550b38859 index.rst: copy-edit
Try to improve the quality of this writing.

Evict a paragraph about running Bash from our documentation front
page.
2021-11-05 16:50:19 -07:00
Aaron Gyes
da896cfcd4 pydoctheme.css: bump up line spacing
make this less of an eye-chart.
2021-11-05 16:34:34 -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
f910133c82 Add kmutil ArgumentParser completions
This is another one like Shortcuts.
2021-11-04 19:54:44 -07:00
Aaron Gyes
e0b67ed466 integrate apple's shortcuts(1) completions
Shipping with Monterey, the new shortcuts.app has a CLI companion
that can output fish completions.
2021-11-04 19:45:36 -07:00
Fabian Homborg
a4ae950312 Readd copyright section
Otherwise the html render will just show

"Copyright ."

Also this is typically added and it's non-intrusive
2021-11-04 22:00:56 +01: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
1c5a88ad21 pydoctheme.css: render #synopsis usage as monospace. 2021-11-04 13:23:22 -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
Johannes Altmanninger
a8956d955f Rename the "none" theme to "None"
Most themes use title case, as do the (change)log entries for this
theme.
2021-11-04 18:41:29 +01:00
Johannes Altmanninger
558041f6e1 None theme: Use reverse video for selected pager entry
Otherwise, with a light-theme, the selected entry uses black text with
"bright black" background, which can be low contrast thus hard to read.

The description background is different, maybe we can fix that later.

See #8376
2021-11-04 18:41:29 +01:00
Fabian Homborg
ea40c1e9de docs: Add missing backticks
This turned `\n` into `n`.
2021-11-04 15:21:28 +01:00
Fabian Homborg
9e86ffe3bc __fish_print_help: Fix unicode characters
This is nroff/groff being broken. It turns "→" into "â". This is even if we select `-Tutf8` and friends.

So, if mandoc exists, we prefer that, and otherwise, run preconv on
the file first (if it exists).

Really, what we would need to to is tell nroff to pass `-KUTF-8` to
groff, but that doesn't appear to be possible.
2021-11-04 15:15:20 +01:00
Aaron Gyes
45de6d167d Remove file size for executables in the pager, and call them commands 2021-11-04 06:17:47 -07:00
Aaron Gyes
57995abb03 fix 'complete' test 2021-11-04 04:18:54 -07:00
Aaron Gyes
40dcfaa90a Completions: do not show directory file size.
Try to shorten these, too.
2021-11-04 04:05:12 -07:00
Aaron Gyes
6a7ba7921a Actually fix fg.py. 2021-11-03 23:33:02 -07:00
Aaron Gyes
b71f3f5359 Fix fg test.
Now to figure out why 'ninja test' seems to silently skip the
interactive tests here (pexpect is installed).
2021-11-03 23:28:48 -07:00
Aaron Gyes
aca3dc3ba3 Add missing test (wasn't one my system ran locally) 2021-11-03 23:05:24 -07:00
Aaron Gyes
d3678c46f2 Revert "Add a function for getting a quick hash/checksum"
This reverts commit 6858abac04.

This was unintentional
2021-11-03 22:55:23 -07:00
Aaron Gyes
fefb913857 Update tests for changed error output 2021-11-03 22:54:55 -07:00
Aaron Gyes
72c04d11ad builtin.cpp: show a short options' - for BUILTIN_ERR_MISSING 2021-11-03 22:54:55 -07:00
Aaron Gyes
710639f5d6 builtins: work on error messages
- Introduce BUILTIN_ERR_COMBO2_EXCLUSIVE
- Distill generally more terse, unambiguous error descriptions.
  Remember English is not everyone's language.
- Do not capitalize sentence fragments
- Use the modality where problem input is in a %s: prefix, then
  is explained.
- Do not address the user (the "You cannot do ..." kraderism)
- Spell out 'arguments' rather than 'args' for consistency
- Mention 'function' as a scope
2021-11-03 22:54:55 -07:00
Aaron Gyes
6858abac04 Add a function for getting a quick hash/checksum
16 bits ought to be enough for anything
2021-11-03 22:54:55 -07:00
ridiculousfish
1b6ef6670f Optimize exit event generation
Watching for exit events is rare, so check if we have any exit events
before actually emitting them. This saves about 2% of time in
external_cmds benchmark.
2021-11-03 17:38:30 -07:00
ridiculousfish
7bd9f1bb23 Rename job_t::notified to job_t::notified_of_stop
This makes it clear that the flag is only used to report whether a job
is stopped.

Also remove process_t::marked_exit_event as we no longer need it.
2021-11-03 15:40:26 -07:00
ridiculousfish
c4fb857dac Refactor process_clean_after_marking
This untangles some of the complicated logic and loops around posting
job exit events, and invoking the fish_job_summary function. No
functional change here (hopefully).
2021-11-03 15:40:18 -07:00
ridiculousfish
00a1df3811 Bravely do not report completed jobs as stopped
Prior to this change, job_t::is_stopped() returned true if there were
zero running processes in the job. This meant that completed jobs were
reported as stopped. Stop doing this, it's a footgun.
2021-11-03 12:23:25 -07:00
ridiculousfish
9b1e04dba2 Use a real flag to mark that a process has generated an exit event
Exited processes generate event_t::process_exit if they exit with a
nonzero status. Prior to this change, to avoid sending duplicate events,
we would clear the status. This is ugly since we're lying about the
process exit status. Use a real flag to prevent sending duplicate
notifications.
2021-11-03 10:28:00 -07:00
Fabian Homborg
7993987b23 Use cksum in the disco prompt
It's posix, and apparently faster on slow systems. I literally can't
see a measurable difference on mine.
2021-11-03 17:52:44 +01:00
Fabian Homborg
de79458be2 docs: Expand string-for-bash-users section
Show some cool stuff.
2021-11-03 17:29:51 +01:00
Fabian Homborg
a4adda5da8 docs: Expand math for bash users a bit
Also fix some awkward typos.
2021-11-03 17:23:36 +01:00
Fabian Homborg
3abe21708d CHANGELOG 8376 2021-11-02 22:13:31 +01:00
Fabian Homborg
d41b4639f7 Also turn off $fish_color_option
(technically introduced after this)
2021-11-02 21:40:56 +01:00
Fabian Homborg
cbf28dfa57 Document turning off suggestions/history
Also add more mentions of `fish_config` in general.
2021-11-02 21:40:56 +01:00
Fabian Homborg
78e87fe881 Add "None" theme
This basically disables syntax highlighting. That doesn't mean we use
absolutely no colors - the search match, suggestion, selection and the
pager have coloring, but only reverse or brblack.

The idea is that this disables anything that tells you about
the *syntax*, but it still tells you about the state of the
commandline. If we didn't highlight the selection it would be entirely
invisible, and if we didn't highlight the suggestion you would have no
idea where it begins.

So this basically brings colors on-par with bash, where the search
match is colored (in reverse) and suggestions aren't a thing.

An alternative is to add a $fish_highlighting_enabled variable like
the one for suggestions. That's still possible, but would require some
internal changes to avoid coloring some things with $fish_color_normal
and other things with the normal terminal color.

One thing this also does not do is set the git prompt colors. These
are currently disallowed from being set in theme files because they
start with `__fish` instead of just `fish`. We should probably rename
them.
2021-11-02 21:40:56 +01:00
Fabian Homborg
86b8cc2097 Allow turning off autosuggestions
This adds a variable, $fish_autosuggestion_enabled.

When set to 0, it will turn off autosuggestions/highlighting.
Setting it to anything else will enable it (which also
means this remains enabled by default).
2021-11-02 21:40:56 +01:00
ridiculousfish
d81f817f70 Correct a dropped lock
When iterating the event handler list, we inadverently dropped a lock
because of how range-based for loops work. Hold the lock outside of the
loop.
2021-11-02 12:46:32 -07:00
Fabian Homborg
fcb74f236a Lock enhancements and RFCs again
The point here is to let issues be *done*, and have any *new*
discussions happen in *new* issues so you can decouple the context.

This revert pending further discussion.
2021-11-02 18:15:30 +01:00
Aaron Gyes
e53c284753
Update lockthreads.yml
exclude RFCs, enhancement requests, have it run weekly.
2021-11-02 09:43:47 -07:00
ridiculousfish
73ea7d257e Remove reader_set_buffer
It was unused.
2021-11-01 11:20:28 -07:00