Make __fish_print_mounted work better on OS X

This commit is contained in:
ridiculousfish 2013-09-05 11:40:51 -07:00
parent 7561075af8
commit 3816abb9de

View file

@ -1,4 +1,7 @@
function __fish_print_mounted --description 'Print mounted devices'
cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -e "s/[0-9\.]*:\//\//"|sgrep "^/"
if test (uname) = Darwin
mount | cut -d " " -f 1-2|tr " " \n|sed -e "s/[0-9\.]*:\//\//"|sgrep "^/"
else
cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -e "s/[0-9\.]*:\//\//"|sgrep "^/"
end
end