29 lines
1.0 KiB
Diff
29 lines
1.0 KiB
Diff
|
diff -up bash_completion/bash_completion~ bash_completion/bash_completion
|
||
|
--- bash_completion/bash_completion~ 2006-03-01 18:20:18.000000000 +0200
|
||
|
+++ bash_completion/bash_completion 2008-09-07 12:25:42.000000000 +0300
|
||
|
@@ -8379,19 +8379,19 @@ _getent()
|
||
|
COMPREPLY=( $( compgen -A hostname $cur ) )
|
||
|
return 0
|
||
|
;;
|
||
|
- protocols)
|
||
|
- COMPREPLY=( $( getent protocols | awk '{print $1}' | grep "^$cur" ) )
|
||
|
+ protocols|networks|ahosts|ahostsv4|ahostsv6|rpc)
|
||
|
+ COMPREPLY=( $( getent $prev | awk '{print $1}' | grep "^$cur" ) )
|
||
|
return 0
|
||
|
;;
|
||
|
- networks)
|
||
|
- COMPREPLY=( $( getent networks | awk '{print $1}' | grep "^$cur" ) )
|
||
|
+ aliases|shadow)
|
||
|
+ COMPREPLY=( $( getent $prev | cut -d : -f 1 | grep "^$cur" ) )
|
||
|
return 0
|
||
|
;;
|
||
|
esac
|
||
|
|
||
|
|
||
|
if [ $COMP_CWORD -eq 1 ]; then
|
||
|
- COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks' -- $cur ) )
|
||
|
+ COMPREPLY=( $( compgen -W 'passwd group hosts services protocols networks ahosts ahostsv4 ahostsv6 aliases ethers netgroup rpc shadow' -- $cur ) )
|
||
|
fi
|
||
|
} &&
|
||
|
complete -F _getent getent
|