Prev / Next

2003-03-26 / bash で補完

rpm --rebuild するとき、file 名を補完しようと TAB を押しても候補に
.src.rpm しかでてこない。/etc/bash_completion を見ると、

        --re@(build|compile))
                if [[ "$cur" == -* ]]; then
                        COMPREPLY=( $( compgen -W '--nodeps --rmsource \
                                --rmspec --sign --nodirtokens' -- $cur ) )
                else
                        _filedir 'src.rpm'
                fi
                ;;


となっていたので、_filedir 'src.rpm' を _filedir '@(nosrc|src).rpm'
に書き換え。

comments powered by Disqus