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().
Utilized the `--install` flag added in commit #8c09d6e.
Limit `eopkg remove/autoremove/check ...` completions to installed packages.
Limit `eopkg install/upgrade/info ...` completions to available packages.
Prior to this fix, __fish_describe_command would error if the
input contained any special characters, because it would be interpolated
into a regex. Hack in a guard to do nothing if the input contains
anything other than [a-zA-Z0-9_ ]
* update nim.fish sample prompt
- Use an helper function to wrap informations
- Add VIRTUAL_ENV infos, if any
- Add __fish_git_prompt, wrapped for the theme
- Add comments
- Remove ASCII failback symbols for tty
(no more useful for me, but if someone really needs it, just ask)
* fish.nim: test -n __fish_git_prompt
Added a new flag `--installed` via `argparse` to `__fish_print_packages`
which indicates that only installed packages should be listed.
TODO: Other non-debian/apt platforms should take advantage of this flag/
behavior as well.
This adds a new string command split0, which splits on zero bytes.
split0 has superpowers because its output is not further split on
newlines when used in command substitutions.
separated_buffer_t encapsulates the logic around discarding (which
was previously duplicated between output_stream_t and io_buffer_t),
and will also encapsulate the logic around explicitly separated
output.
It was only introduced in 2.16, which was released in January 2018.
Instead, we just use a bare "--ignored", which is equivalent to "--ignored=traditional".
The difference to "--ignored=matching" mode shouldn't matter to us here.
Fixes#5074.
Executes `whatis` safely, returns at most one line, and strips the name
of the command from the start of line, returning a value fit for use as
the description parameter for a completion argument value.
Fixes
- Use the actual path when skipping unusable paths to fix all Include
directives being skipped when there is no ~/.ssh directory
- Prevent "No matches for wildcard" message
Improvements
- Skip paths that are directories since we only want files
- Remove `cd` as it is not needed
__fish_complete_suffix assumed that the only literal . in a path
would be the . before an extension, and stripped accordingly. This
behavior has been there for a long time, but broke many things
including completion of relative paths and completion of paths with
a literal . in a directory name.
__fish_complete_suffix does not just complete extensions (or at the
very least, it no longer does just that) but rather any suffix, so
isolating the path name without the extension was unnecessary in all
cases.
If just one of the range ends is negative, this now forces direction away from it.
I.e. if the beginning is negative, we go in reverse.
If the end is negative, we go forwards.
This fixes cases like
$var[2..-1]
if $var only has one element.