This commit is contained in:
Freddy Vulto 2009-10-18 12:38:04 +02:00
parent ffe704c24b
commit 0dda212d95

View File

@ -417,7 +417,8 @@ if [[ "$1" != -d ]]; then
fi
COMPREPLY=( "${COMPREPLY[@]}" "${toks[@]}" )
}
} # _filedir()
# This function splits $cur=--foo=bar into $prev=--foo, $cur=bar, making it
# easier to support both "--foo bar" and "--foo=bar" style completions.
@ -767,6 +768,7 @@ deinstall clean clean-depends kernel buildworld' make
[ -d /etc/init.d/ ] && complete -F _service $default \
$(for i in /etc/init.d/*; do echo ${i##*/}; done)
# chown(1) completion
#
_chown()
@ -807,9 +809,10 @@ deinstall clean clean-depends kernel buildworld' make
;;
esac
fi
}
} # _chown()
complete -F _chown $filenames chown
# chgrp(1) completion
#
_chgrp()
@ -848,9 +851,10 @@ deinstall clean clean-depends kernel buildworld' make
fi
return 0
}
} # _chgrp()
complete -F _chgrp $filenames chgrp
# umount(8) completion. This relies on the mount point being the third
# space-delimited field in the output of mount(8)
#
@ -867,6 +871,7 @@ deinstall clean clean-depends kernel buildworld' make
}
complete -F _umount $dirnames umount
# mount(8) completion. This will pull a list of possible mounts out of
# /etc/{,v}fstab, unless the word being completed contains a ':', which
# would indicate the specification of an NFS server. In that case, we
@ -913,9 +918,10 @@ deinstall clean clean-depends kernel buildworld' make
fi
return 0
}
} # _mount()
complete -F _mount $default $dirnames mount
# Linux rmmod(8) completion. This completes on a list of all currently
# installed kernel modules.
#
@ -929,9 +935,10 @@ deinstall clean clean-depends kernel buildworld' make
_installed_modules "$cur"
return 0
}
} # _rmmod()
complete -F _rmmod rmmod
# Linux insmod(8), modprobe(8) and modinfo(8) completion. This completes on a
# list of all available modules for the version of the kernel currently
# running.
@ -968,9 +975,10 @@ deinstall clean clean-depends kernel buildworld' make
fi
return 0
}
} # _insmod
complete -F _insmod $filenames insmod modprobe modinfo
}
} # have rmmod
# renice(8) completion
#
@ -1002,6 +1010,7 @@ _renice()
}
complete -F _renice renice
# kill(1) completion
#
_kill()
@ -1156,7 +1165,7 @@ _known_hosts()
[ "$1" = -a ] || [ "$2" = -a ] && options=-a
[ "$1" = -c ] || [ "$2" = -c ] && options="$options -c"
_known_hosts_real $options "$(_get_cword)"
}
} # _known_hosts()
# Helper function for completing _known_hosts.
# This function performs host completion based on ssh's known_hosts files.
@ -1324,7 +1333,7 @@ _known_hosts_real()
fi
return 0
}
} # _known_hosts_real()
complete -F _known_hosts traceroute traceroute6 tracepath tracepath6 \
ping ping6 fping fping6 telnet host nslookup rsh rlogin ftp dig ssh-installkeys mtr