Commit graph

14993 commits

Author SHA1 Message Date
Aaron Gyes
ff1aea3d96 unnecessary pass statement 2021-12-12 10:45:50 -08:00
Johannes Altmanninger
8208fc4f87 Cleanup comment to match implementation
This was recently changed to return bool.
2021-12-12 18:21:35 +01:00
Johannes Altmanninger
fbb21a36f5 CHANGELOG: simplify example 2021-12-12 18:13:20 +01:00
Johannes Altmanninger
bb26e25b9d CHANGELOG: fix typo 2021-12-12 14:07:28 +01:00
Aaron Gyes
5e96f817a6
Update command.rst 2021-12-12 00:17:16 -08:00
Aaron Gyes
f464bbebfe command -v: exit 127 if command not found
Align with the spec
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/command.html

Fixes #8547
2021-12-11 22:15:26 -08:00
Ilan Cosman
521eebef7b
Speed up, fix fish_status_to_signal (#8530)
* Speed up fish_status_to_signal

* Use generated kill signals, not hardcoded
2021-12-11 13:54:11 -08:00
Aaron Gyes
ccf0b69c3d Apply Johannes' patch.
I goofed this up.
2021-12-11 10:49:40 -08:00
Andrey Mishchenko
3b7994df52 Add completions for nodeenv v1.6.0 2021-12-11 10:25:07 +01:00
Andrey Mishchenko
bc25b566a0 Add CHANGELOG entry noting special input functions no longer available as fish functions 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
bb0376887f Fix underline width 2021-12-11 10:19:18 +01:00
Andrey Mishchenko
98d443083d Fix word usage complimenting -> complementing 2021-12-11 10:19:18 +01: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
Andrey Mishchenko
fb73a4b2e2 Implement nextd-or-forward-word and prevd-or-backward-word in C++ 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
Aaron Gyes
e181d825fa fix maybe_lock_file
introduced in previous commit
2021-12-09 00:58:05 -08:00
Aaron Gyes
ce475c0b4c more int -> bool
all the things
2021-12-09 00:52:45 -08:00
Aaron Gyes
b3a4b23d9b sanity.{cpp,h}: remove, entirely unused
insane in the brain
2021-12-09 00:41:47 -08:00
Aaron Gyes
815502fa9e missed a spot in history.cpp.
path_get_data_is_remote is a bool, mostly.
2021-12-09 00:33:20 -08:00
Aaron Gyes
e65405ef52 int -> maybe_t<bool> 2021-12-09 00:29:37 -08:00
Aaron Gyes
f33df5a533
CHANGELOG.rst: a/an 2021-12-08 23:28:10 -08:00
David Adam
172b7a3995 CHANGELOG: work on 3.4.0
Includes list of issues that can be omitted for now.
2021-12-09 13:47:44 +08:00
EmilySeville7cfg
4dc685db6b Completions for builtin argparse
Closes #8434
2021-12-05 08:33:36 +01: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
Johannes Altmanninger
4a575b26f5 Fix error check for repeated quoted command substitution
Commit e40eba358 (Treat text following quoted command substitution
as quoted) made parse_util_locate_cmdsubst_range() aware of quoted
command substitutions, by skipping surrounding text via quote_end().

However, it was not quite right. We fail to properly parse
two consecutive command substitutions in the same string,
because we don't maintain the quoting context across calls to
parse_util_locate_cmdsubst_range().  Let's track that bit in a
parameter. This allows us to get rid of the quote_end() hack.

Also apply this to the other place where we call
parse_util_locate_cmdsubst_range() in a loop (highlighting).

Fixes #8500
2021-12-04 16:56:07 +01:00
Johannes Altmanninger
c706b1d6cb Reword confusing comments about quoted cmdsub tokenization 2021-12-04 16:52:13 +01:00
Johannes Altmanninger
b5739ddacf Report sub-token error locations again
This fixes a regression about where we report errors:

	echo error(here
	old: ^
	   fixed: ^

Commit 0c22f67bd (Remove the old parser bits, 2020-07-02) removed
uses of "error_offset_within_token" so we always report errors at
token start. Add it back, hopefully restoring the 3.1.2 behavior.

Note that for cases like

	echo "$("

we report "unbalanced quotes" because we treat the $( as double
quote.  Giving a better error seems hard because of the ambguity -
we don't know if quote is meant to be inside or outside the command
substitution.
2021-12-04 16:52:13 +01:00
Johannes Altmanninger
594c23181f Changelog for completion pager fix on multiline command (#8509) 2021-12-04 16:52:13 +01:00
Kid
bacd47f35f Add completion for Starship 2021-12-04 10:38:14 +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
7f4b71e533 Delete trailing whitespace 2021-12-04 10:37:49 +01:00
Emily Grace Seville
04de5b1fec
/define option for pabcnetcclear completion (#8526)
* Add /define option

* Fix PascalABC.NET version
2021-12-04 10:32:40 +01:00
Andrey Mishchenko
a3bf41223e Reword documentation for filename in man status 2021-12-04 10:32:15 +01:00
Alexander Sieg
7d34908baa Complete cargo subcommands without description
Cargo subcommand extensions don't provide a description in `cargo --list`,
the regex used to filter this list ignored lines without a description.
This change fixes that.
2021-12-04 10:31:11 +01:00
Fabian Homborg
3700247b55 Use the full path for noshebang'd scripts
If you make a script called `foo` somewhere in $PATH, and did not give
it a shebang, this would end up calling

    sh foo

instead of

    sh /usr/bin/foo

which might not match up.

Especially if the path is e.g. `--version` or `-` that would end up
being misinterpreted *by sh*.

So instead we simply pass the actual_cmd to sh, because we need it
anyway to get it to fail to execute before.
2021-12-02 21:10:57 +01:00
Johannes Altmanninger
0c76b571c7 Fix tmux-complete test on macOS CI
For some reason, the window dimension parameters are ignored by tmux.
Not even an extra "resize-pane -x 80 -y 10" helps. So let's just drop
that assumption from our tests.
2021-12-02 15:10:13 +01:00
Aaron Gyes
124dac4781
Update main.yml 2021-12-02 05:54:29 -08:00
Aaron Gyes
9b9e2f9f87 timer.cpp: fix format specifiers and type confusion
I think the auto-all-the-things here was a making this a little
hard to follow, so replace these things that will be used in printf
with what they really are. And change the * lengths to ints.

should clear up the alerts.
2021-12-02 05:33:21 -08:00
Aaron Gyes
2b736d023f skip tmux-complete on Darwin
There's some kind of weird problem with homebrew's terminfo and
tmux, that is beyond working around AFAICT.
2021-12-02 05:09:04 -08:00
Aaron Gyes
1df7e9802f
CodeQL on master pushes
LGTM uses CodeQL and gives us green lights on PRs. This should live at https://github.com/fish-shell/fish-shell/security/code-scanning.
2021-12-02 04:23:09 -08:00
Kid
75d16c13ea Use --almost-all in la function 2021-12-02 02:22:40 -08:00
Johannes Altmanninger
0cd3ed4b84 Fix completion pager rendering when there are lines after cursor
When the completion pager fills up all lines of the screen, we subtract
from the pager size the number of lines occupied by the prompt +
command line buffer (typically 1), so the command line is always
visible.  However, we only subtract the number of lines *before* the
cursor, so on some multiline commandlines we draw a pager that is
too large for our screen, clobbering the commandline rendering.
Fix this by counting all lines.

Fixes #8509
Possibly fixes #8405
2021-12-02 04:58:46 +01:00
Johannes Altmanninger
667bedad3d Fix stale comment referencing s_write
s_write is no more since 887867201 (Switch screen.h free functions
to member functions on screen_t, 2021-09-21).
2021-12-02 04:58:46 +01:00
Fabian Homborg
be43e95ac9 docs: Expand path variable section 2021-12-01 19:03:40 +01:00