- migrated to Exherbo
- added a few initial Pantheon components
This commit is contained in:
parent
cb6360a7e8
commit
2d2bbbc830
85 changed files with 931 additions and 2 deletions
60
gentoo-packages/app-paludis/plop/files/plop.bash-completion
Normal file
60
gentoo-packages/app-paludis/plop/files/plop.bash-completion
Normal file
|
@ -0,0 +1,60 @@
|
|||
# -*- shell-script -*-
|
||||
# If you have bash completion installed and want plop to auto-complete
|
||||
# packages, save this file as /etc/bash_completion.d/plop
|
||||
#
|
||||
# Copyright 1999-2002 Gentoo Technologies, Inc.
|
||||
# Distributed under the terms of the GNU General Public License, v2 or later
|
||||
#
|
||||
# Author: Geert Bevin <gbevin@theleaf.be>
|
||||
# Author: Zach Forrest <zach@disinformation.ca>
|
||||
#
|
||||
# Adapted for genlop by Giorgio Mandolfo <giorgio@pollycoke.org>
|
||||
# Adapted for plop by Tobias Hommel <software@genoetigt.de>
|
||||
#
|
||||
_plop()
|
||||
{
|
||||
local cur grepcmd sedcmd systemactions setsma setbig portagedir origdir
|
||||
|
||||
origdir="${PWD}"
|
||||
COMPREPLY=()
|
||||
# whoa, what a funny construction
|
||||
portagedir="$( echo `eval echo $(grep '^location' /etc/paludis/repositories/gentoo.conf|sed 's/^location = \(.*\)/\1/')` )"
|
||||
if [ -z "${portagedir}" ]; then
|
||||
portagedir=/usr/portage
|
||||
fi
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
|
||||
cd "${portagedir}"
|
||||
grepcmd="grep -E ^${cur}.*"
|
||||
sedcmd="sed -e /^[^-]*$/d"
|
||||
case "$cur" in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W '--current --file --help \
|
||||
--info --gmt --list --nocolor --pretend --rsync \
|
||||
--search --time --unmerge --version' -- $cur ) )
|
||||
;;
|
||||
*)
|
||||
if [ "${cur}" ]; then
|
||||
if [ $(echo "${cur}" | grep '/') ]; then
|
||||
setbig=$(compgen -G "${cur}*" | ${sedcmd})"${systemactions}"
|
||||
COMPREPLY=($(echo "${setbig}" | $grepcmd))
|
||||
else
|
||||
setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${systemactions}"
|
||||
if [ $(echo "${setsma}" | ${grepcmd} | grep '/' | wc -l) = 1 ]; then
|
||||
setbig=$(compgen -G "*/*" | ${sedcmd})"${systemactions}"
|
||||
COMPREPLY=($(echo "${setbig}" | ${grepcmd}))
|
||||
else
|
||||
COMPREPLY=($(echo "${setsma}" | ${grepcmd}))
|
||||
fi
|
||||
fi
|
||||
else
|
||||
setsma=$(compgen -S '/' -G "${cur}*" | ${sedcmd})"${systemactions}"
|
||||
COMPREPLY=($(echo "${setsma}"))
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
cd "${origdir}"
|
||||
return 0
|
||||
}
|
||||
complete -o default -F _plop plop
|
Loading…
Add table
Add a link
Reference in a new issue