From d17f6b7ce4ec374546902064d52e058f0481e66f Mon Sep 17 00:00:00 2001
From: axel <axel@liljencrantz.se>
Date: Mon, 17 Oct 2005 23:27:46 +1000
Subject: [PATCH] Minor completion updates for umount

darcs-hash:20051017132746-ac50b-4f69deeeed995370e35f8e731387f75422df0e71.gz
---
 init/completions/umount.fish |  3 ++-
 init/fish_complete.fish      | 14 +++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/init/completions/umount.fish b/init/completions/umount.fish
index c72405835..489a392bd 100644
--- a/init/completions/umount.fish
+++ b/init/completions/umount.fish
@@ -10,7 +10,7 @@ complete -y mount
 #
 # Find all mountpoints
 #
-complete -c umount -d "Mount point" -a '(cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -re "s/[0-9\.]*:\//\//"|grep "^/")'
+complete -c umount -d "Mount point" -x -a '(cat /etc/mtab | cut -d " " -f 1-2|tr " " \n|sed -re "s/[0-9\.]*:\//\//"|grep "^/")'
 
 complete -c umount -s V -d "Display version and exit"
 complete -c umount -s h -d "Display help and exit"
@@ -24,3 +24,4 @@ complete -c umount -s t -d "Actions should only be taken on file systems of the
 complete -c umount -s O -d "Indicate  that  the  actions should only be taken on file systems with the specified options in /etc/fstab" -xa '(cat /etc/mtab | cut -d " " -f 4)\t"Mount option"'
 complete -c umount -s f -d "Force unmount (in case of an unreachable NFS system)"
 complete -c umount -s l -d "Detach the filesystem from the filesystem hierarchy now, and cleanup all references to the filesystem as soon as it is not busy"
+
diff --git a/init/fish_complete.fish b/init/fish_complete.fish
index 15ee35ea9..283001fd4 100644
--- a/init/fish_complete.fish
+++ b/init/fish_complete.fish
@@ -30,8 +30,10 @@ end
 # without the description
 #
 
+#
 # Find files that complete $argv[1], has the suffix $argv[2], and
 # output them as completions with description $argv[3]
+#
 
 function __fish_complete_suffix -d "Complete using files"
 
@@ -56,7 +58,8 @@ function __fish_complete_suffix -d "Complete using files"
 end
 
 #
-# Find directories that complete $argv[1], output them as completions with description $argv[2] if defined, otherwise use 'Directory'
+# Find directories that complete $argv[1], output them as completions
+# with description $argv[2] if defined, otherwise use 'Directory'
 #
 
 function __fish_complete_directory -d "Complete using directories"
@@ -143,8 +146,6 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
 
 	for i in $short_opt
 
-#		echo >&2 Test short option \'$i\'
-
 		if test -z $i
 			continue
 		end
@@ -163,8 +164,6 @@ function __fish_contains_opt -d "Checks if a specific option has been given in t
 			continue
 		end
 
-#		echo >&2 Test long option $i
-
 		if contains -- --$i (commandline -cpo)
 			return 0
 		end
@@ -232,8 +231,9 @@ function __fish_append -d "Internal completion function for appending string to
 	printf "%s\n" $str$argv $str$argv,
 end
 
-
-#Completions for SysV startup scripts
+#
+# Completions for SysV startup scripts
+#
 
 set -g __fish_service_commands '
 	start\t"Start service"