* color: make brgrey really grey
The 0055 value is actually 0x2d which isn't 0x55 mentioned further and is probably a typo
* color.cpp: reformat color table
Tidy color table up and also fix hex number case for grey color. This should ease spotting errors like one from previous commit.
We now are stingier with taking history file locks - if the lock
is held too long we may just break it. But the current file save
architecture holds the lock for the duration of the save. It also
has some not-quite-right checks that can cause spurious failures in
the history stress test.
Reimplement the history save to retry. Rather than holding the lock,
rewrite the file to a temporary location and then take the lock. If
the history file has changed, start all over.
This is going to be slower under contention, but the advantage is that
the lock is only held for a brief period (stat + rename) rather than
across calls to write().
Some updated logic also fixes spurious failures that were easy to observe
when tsan was enabled. These failures were due to failing to check if the
file at the path was the same file we opened.
The next step is to move the history file saving to a background thread
to reduce the chances of it impacting user's typing.
Allow retrying, fix an issue where we trip over our own changes
by thinking the file has changed when we are responsible for changing
it, and improve some commenting
This class is used to accumulate data to be written to the history
file. It has some dubious optimizations around trying to track an
offset separately from the size of the buffer. After some investigation
these aren't helping, vector behaves fine on its own. So just make
this a simple wrapper around vector.
Before this change the function `__fish_print_filesystems` would print
an error message about an empty wildcard match for the pattern
`$PATH/mount.*`, if the current operating system does not include any
helper binaries for the command `mount`. An example for such an OS is
the current version of macOS (version 10.12).
Cache the escape sequences we've seen when checking for those which
don't take any visual space when writing the prompt or similar strings.
This reduces the cost of determining the true cost of such strings by a
full order of magnitude if they include lots of such escape sequences.
Periodically sort the cached escape sequence lengths based on feedback
from cache hits so that we're always checking for the most likely
sequence lengths first.
Also cache the prompt layouts to avoid doing the calculations if the
prompt doesn't change.
Fixes#3793
Change the escape key binding in insert mode (in vi key bindings)
to check if we are in paging mode. If so, emit cancel and stay in
insert mode. Otherwise perform the current behavior of switching
back to default mode and adjusting the cursor.
Fixes#2871
Currently, if bind is run with --mode but not --sets-mode, the
binding gets an implicit --sets-mode equivalent to the mode. This
is usually unobservable but it may matter if the mode is changed
by some internal part of the binding (e.g. set fish_bind_mode...)
then that setting will be lost after the binding is complete.
* Add completions for minikube
This adds basic completions for minikube, the subcommands and their options.
* Improve minikube completions
- Use more consistent and shorter descriptions.
- Fix subcommand options
- Add more semantic completions
* Fix named variable for option value
* Add completions for minikube addons enable/disable
* Add completions for minikube addons open
This commit addresses many of the style problems with the previous
commit. If this introduces any bugs they are solely my fault. The style
of this code needs more improvement. Some of which could be done today.
Others will have to wait until `fish_indent` is improved.
Add IPV6 /etc/hosts completion support. Parses columns rather than values which produces improved output.
Support ssh -F and Include completion
Ignore ssh Hostname and Host with wildcard. The following only get in the way:
- Hostname: Host resolves to Hostname
- Wildcard Host: Cannot ssh to a glob pattern
Improve scp completions
* complete only local files when no host provided
* complete only remote files when host is provided
* complete local files or hosts when no separator
Disable username completion for ssh/scp
Username completion only provides local users which will unlikely be
useful on a remote machine. ssh will use the current username (the only
useful one) or one provided in the ssh config.
Commit 8645aa94 was made because it seemed necessary at the time. However,
when I run `make lint-all` now it complains about include loops for header
`signal.h`. This reverts part of that earlier commit to get sane behavior
from IWYU again.
This was an old experiment to compile scripts directly into the
shell itself, reducing the amount of I/O performed at startup.
It has not been used for a long time. Time to remove it.