- mount completion should ignore commented out lines in /etc/fstab

This commit is contained in:
ianmacd 2002-10-10 13:43:38 +00:00
parent 9913362b38
commit d1041d29dc

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b
#
# $Id: bash_completion,v 1.435 2002/10/10 08:38:05 ianmacd Exp $
# $Id: bash_completion,v 1.436 2002/10/10 15:43:38 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -470,7 +470,7 @@ _mount()
sed -ne '3,$s|^[^A-Za-z]*\([^'$'\t '']*\).*$|//'$host'/\1|p' ) )" -- "$cur" ) )
fi
else
COMPREPLY=( $( awk '{if ($2 ~ /\//) print $2}' /etc/fstab | \
COMPREPLY=( $( awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab | \
grep "^$cur" ) )
fi