--authoritative and --unauthoritative 'complete' builtin switches have no effect anymore.
This commit removes usage of --unautoritative/-u in completions.
--authoritative and --unauthoritative 'complete' builtin switches have no effect anymore.
This commit removes usage of --autoritative/-A in completions.
The complete builtin had once -A / --authoritative and -u /
--unauthoritative switches which indicated whether all possibilities for
completion are specified and would cause an error if the completion was
authoritative and an unknown option was encountered.
This feature was functionally removed during one of the past parser
rewritings, but -A and -u still remained in parts of the code and
command completions, although having no effect.
This commit removes the leftovers and prints an warning whenever user
tries to run the complete command with -A / -u / --authoritative /
--unauthoritative switches.
Fixes#3640.
Commit 8d27f81a to change how background jobs are handled (killed rather
than left running) when the shell is exited did not correctly handle
the nested interactive context created by the `breakpoint` command. This
fixes that mistake. Now any background jobs that already existed, or were
created within the `breakpoint` context, are left running when exiting
that context.
Fish is not consistent with other shells like bash and zsh when exiting
an interactive shell with background jobs. While it is true that fish
explicitly claims no compatibility with POSIX 1003.1 this is an area
where deviation from the established practice adds negative value.
The reason for the current behavior seems to be due to two users who did
not understand why interactive shells managed background jobs as they
did and were not aware of tools like `nohup` or `disown`. See issue
There is also a fairly significant bug present due to a misunderstanding of
what a true value from `reader_exit_forced()` means. This change corrects
that misunderstanding.
Fixes#3497
The recent discussion around allowing the user to change various termios
(i.e., stty) settings reminded me that there are places in our code
where we assume the interrupt key is [ctrl-C]. That's a bad assumption.
Instead use the actual value reported to us by the kernel.
This also makes the fkr program friendlier by always reporting when a
signal was received, not just when run with -d2, and prompting the user
to press the INTR or EOF key a second time to exit.
The recent refactoring to separate default (emacs) from vi key bindings
overlooked adding `\cH` bindings to vi mode. This also fixes the
behavior of the [del] key bindings (\x7F).
Fixes#3653
If acquiring a lock on the history or uvar file takes more than 250 ms
disable locking of the file. On systems with broken remote file system
locking it can cause tens of seconds delay after running each command
which can make the shell borderline unusable.
This also changes history file locking to use flock() rather than
fcntl() to be consistent with uvar file locking. It also implements the
250 ms time limit before giving up on locking.
Fixes#685
If an interactive shell has its tty invalidated attempts to write to
stdout or stderr can trigger this bug:
https://sourceware.org/bugzilla/show_bug.cgi?id=20632
Avoid that by reopening the stdio streams on /dev/null if we're getting
an ENOTTY error when trying to do things like give or take ownership of
the tty.
This includes some unrelated style cleanups but including them seems
reasonable.
Fixes#3644
This implements a standard function and bindings for editing the command
line in an external editor. This feature has been requested multiple
times in the past year with various solutions cut and pasted into those
issues. This change combines the best aspects of those solutions.
Fixes#1215
There were two places in the code that used the anti-pattern of
returning True on success else an error message. In python you should
always be able to replace `if x == True:` with just `if x:`. Which is
what the lint tool recommended. Unfortunately I didn't notice how the
return value was being used. This fixes that by changing the two
affected functions to return an error message or None on success.
This also adds `from __future__ import print_function` since the code
uses the `print(msg)` function form rather than the `print msg`
statement form. The former works by accident on python2 because the
parens are interpreted as creating parenthesized expression that
devolves to the single string inside the parens. So while the future
import isn't strictly speaking necessary it will help avoid mistakes in
the future if more complex `print()` calls are added.
Partial fix for #3620
`abbr` used to take a single argument and split in on the first space,
but 309e10e7 and predecessors altered this behaviour. Update the web
config use of abbr to the newer format.
Fixes#3620.
I had disabled having `make style-all` restyling fish scripts because a
majority of them did not conform to the style enforced by `fish_indent`.
I recently restyled most of the fish scripts with the exception of the
completion scripts. So this re-enables restyling all scripts with the
exception of completion scripts.
When I refactored the code to reduce redundancy and improve the error
messages when the config or data directories could not be used I botched
the customization of the $HOME based data path.
min_width dates back to the original full-screen pager.
After some careful inspection, the code path that uses min_width
is never executed and so the min_width machinery is useless.
Let's remove it!