Split iconv completion to contrib/iconv
This commit is contained in:
parent
6a9c2b191b
commit
fe1e044ed1
1
CHANGES
1
CHANGES
@ -14,6 +14,7 @@ bash-completion (1.x)
|
|||||||
* Don't assume "sed" being GNU sed, use "gsed" whenever available
|
* Don't assume "sed" being GNU sed, use "gsed" whenever available
|
||||||
(Debian: #501479, Alioth: #311393)
|
(Debian: #501479, Alioth: #311393)
|
||||||
* Split mutt completion to contrib/mutt
|
* Split mutt completion to contrib/mutt
|
||||||
|
* Split iconv completion to contrib/iconv
|
||||||
|
|
||||||
[ Ville Skyttä ]
|
[ Ville Skyttä ]
|
||||||
* Split yum and yum-arch completion into contrib/yum.
|
* Split yum and yum-arch completion into contrib/yum.
|
||||||
|
@ -34,6 +34,7 @@ bashcomp_DATA = contrib/ant \
|
|||||||
contrib/gzip \
|
contrib/gzip \
|
||||||
contrib/harbour \
|
contrib/harbour \
|
||||||
contrib/heimdal \
|
contrib/heimdal \
|
||||||
|
contrib/iconv \
|
||||||
contrib/imagemagick \
|
contrib/imagemagick \
|
||||||
contrib/info \
|
contrib/info \
|
||||||
contrib/iptables \
|
contrib/iptables \
|
||||||
|
@ -3204,34 +3204,6 @@ _ypmatch()
|
|||||||
} &&
|
} &&
|
||||||
complete -F _ypmatch ypmatch ypcat
|
complete -F _ypmatch ypmatch ypcat
|
||||||
|
|
||||||
# iconv(1) completion
|
|
||||||
#
|
|
||||||
have iconv &&
|
|
||||||
_iconv()
|
|
||||||
{
|
|
||||||
local cur prev
|
|
||||||
|
|
||||||
COMPREPLY=()
|
|
||||||
cur=`_get_cword`
|
|
||||||
prev=${COMP_WORDS[COMP_CWORD-1]}
|
|
||||||
|
|
||||||
case "$prev" in
|
|
||||||
-@(f|t|-@(from|to)-code))
|
|
||||||
COMPREPLY=( $( compgen -W \
|
|
||||||
'$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) )
|
|
||||||
return 0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
|
|
||||||
if [[ "$cur" = -* ]]; then
|
|
||||||
COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list
|
|
||||||
--output -o --verbose' -- "$cur" ) )
|
|
||||||
return 0
|
|
||||||
fi
|
|
||||||
} &&
|
|
||||||
complete -F _iconv $default iconv
|
|
||||||
|
|
||||||
# dict(1) completion
|
# dict(1) completion
|
||||||
#
|
#
|
||||||
{ have dict || have rdict; } && {
|
{ have dict || have rdict; } && {
|
||||||
|
27
contrib/iconv
Normal file
27
contrib/iconv
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
# iconv(1) completion
|
||||||
|
#
|
||||||
|
have iconv &&
|
||||||
|
_iconv()
|
||||||
|
{
|
||||||
|
local cur prev
|
||||||
|
|
||||||
|
COMPREPLY=()
|
||||||
|
cur=`_get_cword`
|
||||||
|
prev=${COMP_WORDS[COMP_CWORD-1]}
|
||||||
|
|
||||||
|
case "$prev" in
|
||||||
|
-@(f|t|-@(from|to)-code))
|
||||||
|
COMPREPLY=( $( compgen -W \
|
||||||
|
'$( iconv --list | sed -e "s@//@@;" )' -- "$cur" ) )
|
||||||
|
return 0
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
|
if [[ "$cur" = -* ]]; then
|
||||||
|
COMPREPLY=( $( compgen -W '--from-code -f --to-code -t --list
|
||||||
|
--output -o --verbose' -- "$cur" ) )
|
||||||
|
return 0
|
||||||
|
fi
|
||||||
|
} &&
|
||||||
|
complete -F _iconv $default iconv
|
Loading…
x
Reference in New Issue
Block a user