Commit graph

10 commits

Author SHA1 Message Date
Fabian Homborg
9fd69acd1a docs: Clean up set a bit
More links! Links good! Link link linky link!
2021-05-12 18:52:24 +02:00
Ethel Morgan
5a0aa7824f Saturate exit codes to 255 for all builtins
After commit 6dd6a57c60, 3 remaining
builtins were affected by uint8_t overflow: `exit`, `return`, and
`functions --query`.

This commit:
- Moves the overflow check from `builtin_set_query` to `builtin_run`.
- Removes a conflicting int -> uint8_t conversion in `builtin_return`.
- Adds tests for the 3 remaining affected builtins.
- Simplifies the wording for the documentation for `set --query`.
- Does not change documentation for `functions --query`, because it does
  not state the exit code in its API.
- Updates the CHANGELOG to reflect the change to all builtins.
2021-02-13 08:41:51 +01:00
Ethel Morgan
6dd6a57c60 Saturate return value in builtin_set_query
builtin_set_query returns the number of missing variables. Because the
return value passed to the shell is an 8-bit unsigned integer, if the
number of missing variables is a multiple of 256, it would overflow to 0.

This commit saturates the return value at 255 if there are more than 255
missing variables.
2021-02-08 20:38:56 +01:00
Fabian Homborg
bb1aa5e72f docs: Make more code lines shorter 2021-02-02 08:35:38 +01:00
Fabian Homborg
4ef6490a26 docs: Some fixes to the erase section of set's exit status
[ci skip]
2020-11-20 16:09:24 +01:00
Fabian Homborg
ad138ecef8 docs: Document sets $status peculiarities harder
[ci skip]
2020-11-20 16:07:22 +01:00
Fabian Homborg
194f4f3734 Update docs for multi-erase in abbr and set
[ci skip]
2020-10-04 12:39:32 +02:00
Fabian Homborg
389c5e7ece Update set --show docs
See #6944
2020-04-26 17:55:17 +02:00
Delapouite
b8281f1284 doc: homogenize commands titles 2020-04-04 10:44:53 +02:00
Aaron Gyes
85a0ca66e0 We no longer have two doc systems, move sphinx_doc_src back to doc_src 2020-02-19 17:00:35 -08:00
Renamed from sphinx_doc_src/cmds/set.rst (Browse further)