mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Fix wildcard bug in __fish_print_filesystems
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).
This commit is contained in:
parent
a5e8b81ee3
commit
908ed493cc
1 changed files with 2 additions and 1 deletions
|
@ -5,5 +5,6 @@ function __fish_print_filesystems -d "Print a list of all known filesystem types
|
|||
set fs $fs reiserfs romfs smbfs sysv tmpfs udf ufs umsdos vfat xenix xfs xiafs
|
||||
# Mount has helper binaries to mount filesystems
|
||||
# These are called mount.* and are placed somewhere in $PATH
|
||||
printf "%s\n" $fs (string replace -ra ".*/mount." "" -- $PATH/mount.*)
|
||||
set -l mountfs $PATH/mount.*
|
||||
printf '%s\n' $fs (string replace -ra '.*/mount.' '' -- $mountfs)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue