Drop drive letter from path to razor root when RAZOR_ROOT set.
If the RAZOR_ROOT environment variable was set to eg., /root then on
Microsoft Windows we were trying to use paths such as /rootC:/Programs
which is obviously wrong. Instead we should drop the drive letter
giving paths of the form /root/Programs. Note that the drive letter is
_not_ migrated to C:/root/Programs: If a root of C:/root was desired
then RAZOR_ROOT would have been set to C:/root.
3 COMPREPLY=($(IFS=: compgen -S' ' -W "info:list-requires:list-provides:list-files:list-file-packages:list-package-files:what-requires:what-provides:import-yum:import-rpmdb:import-rpms:validate:update:diff:install:init:download" -- $1))
9 COMPREPLY=($(razor list --only-names "$1*" | while read p; do echo "$p "; done))
12 __razor_upstream_packages () {
15 COMPREPLY=($(RAZOR_REPO=rawhide.rzdb razor list --only-names "$1*" | while read p; do echo "$p "; done))
19 COMPREPLY=($(razor list-files "$1*"))
23 COMPREPLY=($(compgen -W "$(razor list-requires)" -- $1))
27 COMPREPLY=($(compgen -W "$(razor list-provides)" -- $1))
31 local cur="${COMP_WORDS[COMP_CWORD]}"
33 if [ $COMP_CWORD = 1 ]; then
36 case "${COMP_WORDS[1]}" in
37 info|list-requires|list-provides|list-package-files)
38 __razor_packages $cur ;;
39 list-files|list-file-packages) __razor_files $cur ;;
40 what-requires) __razor_requires $cur ;;
41 what-provides) __razor_provides $cur ;;
42 install|download) __razor_upstream_packages $cur ;;
47 complete -o nospace -F __razor razor