aboutsummaryrefslogtreecommitdiffhomepage
path: root/share/functions/__fish_print_mounted.fish
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-09-05 11:40:51 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-09-05 11:40:51 -0700
commit3816abb9def78bca7608401821dd388ad62ccea4 (patch)
treed014962a9b4f08ea07aaf218723febdd156732f4 /share/functions/__fish_print_mounted.fish
parent7561075af8a375d6f6c14be0132e9d65ac650aa6 (diff)
Make __fish_print_mounted work better on OS X
Diffstat (limited to 'share/functions/__fish_print_mounted.fish')
-rw-r--r--share/functions/__fish_print_mounted.fish7
1 files changed, 5 insertions, 2 deletions
diff --git a/share/functions/__fish_print_mounted.fish b/share/functions/__fish_print_mounted.fish
index a7cfc0de..482559a8 100644
--- a/share/functions/__fish_print_mounted.fish
+++ b/share/functions/__fish_print_mounted.fish
@@ -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