From 908ed493cc447dae062a98518096350d69dacf57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Schwaiger?= Date: Sun, 5 Feb 2017 16:34:48 +0100 Subject: [PATCH] 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). --- share/functions/__fish_print_filesystems.fish | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/functions/__fish_print_filesystems.fish b/share/functions/__fish_print_filesystems.fish index 8dbadc7f4..ab6c4c767 100644 --- a/share/functions/__fish_print_filesystems.fish +++ b/share/functions/__fish_print_filesystems.fish @@ -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