Improves experience during upgrades, accidentally running
an old fish with a new environment. No errors just from
printing a prompt. Fixes#3057.
Print helpful notice also when launching mismatched fish.
Autoloadable string.fish -- only create function if not builtin.
In addition to fixing the setting of the locale to C/POSIX this also
corrects several problems introduced by the commits made in the past
couple of days. As a consequence of dealing with all of this I decided
to refactor the code to simplify one of the overly long functions I
introduced in my previous change.
Fixes#3168
There is no conceivable way in which timef()'s invocation of gettimeofday()
can fail where it makes sense to continue running. Yes, one such,
legitimate, failure mode is a 32-bit kernel and the date is greater than
2038-01-19 03:14:07. If you're running a fish binary on such a system
it's time to upgrade. Otherwise, either the hardware or OS is broken.
Fixes#3167.
* Correct notice about ^C
* Move time deltas to end of the line away from the important info on
left.
* Use timef() instead of gettimteofday() ourselves
* Show time in ms (is this even useful in any unit? Maybe testing escape
delays...)
* Make init more similar to other apps.
```
~ $ set -e TERM; fish
Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690.
fish: 'fish' terminated by signal SIGABRT (Abort)
```
We need to actually export the curses/terminfo env vars in order for
`setupterm()` to be able to use them. While fixing this I reworked the
fallback logic implemented by @zanchey in response to issue #1060 in
order to simplify the logic and clarify the error messages.
This does not allow someone to change the curses/terminfo env vars after
the first prompt is displayed (you can but it won't affect the current
fish process). It only makes it possible to set `TERM`, `TERMINFO`, and
`TERMINFO_DIRS` in *config.fish* or similar config file and have them be
honored by fish.
```
~ $ set -e TERM; fish
Assertion failed: (!is_missing), function c_str, file src/env.cpp, line 690.
fish: 'fish' terminated by signal SIGABRT (Abort)
```
Completion throws and error about the command `__fish_contains_opts` beings unknown. It seems to be a simple typo, as all other completions use `__fish_contains_opt`
https://www.freebsd.org/cgi/man.cgi?query=ssh_config&sektion=5
1. It is possible to add multiple whitespace characters between the keyword (i.e. Host) and the argument(s).
2. It is allowed to have a single = and whitespace between the keyword and the argument(s).
3. It is possible to add multiple host names under a single Host directive by spacing the names apart.
1. and 3. are actual conventions that we use in our team, and I couldn't get auto-complete working for fish without this modification.
Modification explained:
a. The space between Host(?:name)? and the \w.* was replaced by (?:\s+|\s*=\s*) to match any sequence of whitespace characters, or optional whitespaces with a single =, per spec.
b. Result of first replacement is piped through another string replace to switch duplicate whitespace characters to a single space, and then piped to be split by that space. This allows specifying several aliases or host names in a single Host/Hostname definition, also per spec.
Fix test setup bogosities. Specifically, they weren't hermetic with respect to
locale env vars.
Rewrite the handling of locale vars to simplify the code and make it more like
the pattern most programs employ.
Fixes#3110
Configure the tty driver to ignore the lnext (\cV) and werase (\cW) characters
so they can be bound to fish functions.
Correct the `fish_key_bindings` program to initialize the tty in the same
manner as the `fish` program.
Fixes#3064
Upgraded to using Tavis trusty dist (from precise)
Ubuntu's clang is only 3.4 though.
For fancy address, thread-sanitizer stuff, easier to do on OS X.
We can use the clang that comes with xcode 8 beta.
The tty device timestamps on MS Windows aren't usable because they're always
the current time. So fish can't use them to decide if the entire prompt needs
to be repainted.
Fixes#2859
The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.
Fixes#2991
The tty device timestamps on MS Windows aren't usable because they're always
the current time. So fish can't use them to decide if the entire prompt needs
to be repainted.
Fixes#2859