This changes the behavior of builtin math to floating point by default.
If the result of a computation is an integer, then it will be printed as an
integer; otherwise it will be printed as a floating point decimal with up to
'scale' digits past the decimal point (default is 6, matching printf).
Trailing zeros are trimmed. Values are rounded following printf semantics.
Fixes#4478
The Informative VCS sample prompt currently sets the `__fish_git_prompt_char_conflictedstate` variable which is unused.
It should instead set the `__fish_git_prompt_char_invalidstate` variable.
Ordering of directories above files was introduced in a recent change to
the same script. By default it does not matter as completions are sorted
by fish internally, but this allows the use of `-k` to sort files before
directories (or piped to `sort -r` for vice-versa).
Use `apt-cache show` instead of `apt-cache packagenames` to efficiently
print package names and a brief description instead of the placeholder
(localized) "Package" text that was previously printed. This applies to
both available and installed packages (for inistall and remove operations,
respectively).
TODO: update `__fish_print_packages` for non-debian platforms to do the
same.
When listing packages already installed (e.g. for use with `apt remove
...`), do not consider packages return by `dpkg --get-selections` with
state 'deinstall'.
Previously the `string replace` pattern was matching both 'install' and
'deinstall' packages.
This reverts commit e2a3dae58b.
This idea failed because ./share was not complete when bliding via cmake;
it misses critical files such as config.fish.
fish tries to be relocatable by looking for directories relative to its
executable. These directories are not found when running fish from
within a cmake build because the etc directory is not present. Stop requiring
this directory to be present since it's not critical for running fish.
Fixes#4825
Don't mmap history files on remote file systems
This merges some changes to history that may help to mitigate the crashes seen in #5088 . These SIGBUS crashes occur when reading a memory mapping whose underlying file was truncated. It's not clear why this should occur more often on NFS (or ever). However memory mapping over NFS is sketchy anyways so this is desirable regardless.
Migrate the mmap() logic into a new class history_file_contents_t which
will serve to encapsulate conditional logic if we choose to use read()
instead of mmap().