-=[ Mr. Bumblebee ]=-
_Indonesia_

Path : /usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/
File Upload :
Current File : //usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyc

σ
EΜπNc@@s»ddlmZddlmZmZmZmZmZmZddlZddl	Z	ddl
Z
defd„ƒYZdefd„ƒYZ
defd	„ƒYZd
efd„ƒYZdefd
„ƒYZdefd„ƒYZdeeedd„Zdejfd„ƒYZedkr·ddlZddlZd„ZejddƒZejddddddƒejddd d!dd"ƒejd#d d!dejƒejd$d d!dd%ƒejd&ddd'd(d)d*d+gd d,d,edd-d.ƒejƒ\Z Z!e!r&ej"d/ƒne#ƒZ$x6e j%j&ƒD]%\Z'Z(e(dk	r?e(e$e'<q?q?Wej)ej*d0ƒe$j+d1eƒsšej,ƒnej-ƒee
j.e$ndS(2i(tabsolute_import(tcmdlinetcommandstconfigthelp_topicstoptiontpluginNtBashCodeGencB@seeZdZded„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„ZRS(s1Generate a bash script for given completion data.t_bzrcC@s||_||_||_dS(N(tdatat
function_nametdebug(tselfR	R
R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyt__init__%s		cC@s,di|jd6|jƒd6|jƒd6S(Ns/# Programmable completion for the Bazaar-NG bzr command under bash.
# Known to work with bash 2.05a as well as bash 4.1.2, and probably
# all versions in between as well.

# Based originally on the svn bash completition script.
# Customized by Sven Wilhelm/Icecrash.com
# Adjusted for automatic generation by Martin von Gagern

# Generated using the bash_completion plugin.
# See https://launchpad.net/bzr-bash-completion for details.

# Commands and options of bzr %(bzr_version)s

shopt -s progcomp
%(function)s
complete -F %(function_name)s -o default bzr
R
tfunctiontbzr_version(R
RR(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pytscript*s

cC@sFdi|jƒd6|jd6|jƒd6|jƒd6|jƒd6S(Ns΄%(function_name)s ()
{
	local cur cmds cmdIdx cmd cmdOpts fixedWords i globalOpts
	local curOpt optEnums
	local IFS=$' \n'

	COMPREPLY=()
	cur=${COMP_WORDS[COMP_CWORD]}

	cmds='%(cmds)s'
	globalOpts=( %(global_options)s )

	# do ordinary expansion if we are anywhere after a -- argument
	for ((i = 1; i < COMP_CWORD; ++i)); do
		[[ ${COMP_WORDS[i]} == "--" ]] && return 0
	done

	# find the command; it's the first word not starting in -
	cmd=
	for ((cmdIdx = 1; cmdIdx < ${#COMP_WORDS[@]}; ++cmdIdx)); do
		if [[ ${COMP_WORDS[cmdIdx]} != -* ]]; then
			cmd=${COMP_WORDS[cmdIdx]}
			break
		fi
	done

	# complete command name if we are not already past the command
	if [[ $COMP_CWORD -le cmdIdx ]]; then
		COMPREPLY=( $( compgen -W "$cmds ${globalOpts[*]}" -- $cur ) )
		return 0
	fi

	# find the option for which we want to complete a value
	curOpt=
	if [[ $cur != -* ]] && [[ $COMP_CWORD -gt 1 ]]; then
		curOpt=${COMP_WORDS[COMP_CWORD - 1]}
		if [[ $curOpt == = ]]; then
			curOpt=${COMP_WORDS[COMP_CWORD - 2]}
		elif [[ $cur == : ]]; then
			cur=
			curOpt="$curOpt:"
		elif [[ $curOpt == : ]]; then
			curOpt=${COMP_WORDS[COMP_CWORD - 2]}:
		fi
	fi
%(debug)s
	cmdOpts=( )
	optEnums=( )
	fixedWords=( )
	case $cmd in
%(cases)s	*)
		cmdOpts=(--help -h)
		;;
	esac

	IFS=$'\n'
	if [[ ${#fixedWords[@]} -eq 0 ]] && [[ ${#optEnums[@]} -eq 0 ]] && [[ $cur != -* ]]; then
		case $curOpt in
			tag:|*..tag:)
				fixedWords=( $(bzr tags 2>/dev/null | sed 's/  *[^ ]*$//; s/ /\\\\ /g;') )
				;;
		esac
		case $cur in
			[\"\']tag:*)
				fixedWords=( $(bzr tags 2>/dev/null | sed 's/  *[^ ]*$//; s/^/tag:/') )
				;;
			[\"\']*..tag:*)
				fixedWords=( $(bzr tags 2>/dev/null | sed 's/  *[^ ]*$//') )
				fixedWords=( $(for i in "${fixedWords[@]}"; do echo "${cur%%..tag:*}..tag:${i}"; done) )
				;;
		esac
	elif [[ $cur == = ]] && [[ ${#optEnums[@]} -gt 0 ]]; then
		# complete directly after "--option=", list all enum values
		COMPREPLY=( "${optEnums[@]}" )
		return 0
	else
		fixedWords=( "${cmdOpts[@]}"
		             "${globalOpts[@]}"
		             "${optEnums[@]}"
		             "${fixedWords[@]}" )
	fi

	if [[ ${#fixedWords[@]} -gt 0 ]]; then
		COMPREPLY=( $( compgen -W "${fixedWords[*]}" -- $cur ) )
	fi

	return 0
}
tcmdsR
tcasestglobal_optionsR(t
command_namesR
t
command_casesRtdebug_output(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRBs[



cC@sdj|jjƒƒS(Nt (tjoinR	tall_command_aliases(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR¦scC@s|js
dSdSdS(NtsŠ
	# Debugging code enabled using the --debug command line switch.
	# Will dump some variables to the top portion of the terminal.
	echo -ne '\e[s\e[H'
	for (( i=0; i < ${#COMP_WORDS[@]}; ++i)); do
		echo "\$COMP_WORDS[$i]='${COMP_WORDS[i]}'"$'\e[K'
	done
	for i in COMP_CWORD COMP_LINE COMP_POINT COMP_TYPE COMP_KEY cur curOpt; do
		echo "\$${i}=\"${!i}\""$'\e[K'
	done
	echo -ne '---\e[K\e[u'
(R(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR©s	
cC@sgtj}|jjs"|d7}nA|d7}x4t|jjjƒƒD]\}}|d|7}qEW|S(Nt.s and the following plugins:s
# %s(tbzrlibtversion_stringR	tpluginstsortedt	iteritems(RRtnameR((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRΊs	

%cC@sdjt|jjƒƒS(NR(RRR	R(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRΔscC@s4d}x'|jjD]}||j|ƒ7}qW|S(NR(R	Rtcommand_case(RRtcommand((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRΗsc	C@sddj|jƒ}|jr3|d|j7}ng}g}x |jD]•}x|jD]}|d|7}qYW|jrΛx(|jD]}|jd||fƒq„W|jd|dj|jƒfƒqI|jt|ƒƒqIW|ddj|ƒ7}|jrA|j}t	|t
ƒr0d	dj|ƒ}n|d
|7}n|rq|d7}|dj|ƒ7}|d
7}n|d7}|S(Ns	%s)
t|s		# plugin "%s"
s		# %s
s%s=%ss%s) optEnums=( %s ) ;;Rs		cmdOpts=( %s )
s( %s )s		fixedWords=%s
s		case $curOpt in
			s
			s
		esac
s		;;
(RtaliasesRtoptionsterror_messagest
registry_keystappendtstrtfixed_wordst
isinstancetlist(	RR#tcaseR&tenumsRtmessagetkeyR+((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR"Νs4					


(
t__name__t
__module__t__doc__tFalseR
RRRRRRRR"(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR"s		d			
		tCompletionDatacB@seZd„Zd„ZRS(cC@s"i|_tƒ|_g|_dS(N(RtsetRR(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR
νs	cc@s1x*|jD]}x|jD]}|VqWq
WdS(N(RR%(Rtcta((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRςs(R2R3R
R(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR6λs	tCommandDatacB@seZd„ZRS(cC@s4||_|g|_d|_g|_d|_dS(N(R!R%tNoneRR&R+(RR!((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR
ϊs
			(R2R3R
(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR:ψst
PluginDatacB@seZdd„Zd„ZRS(cC@sO|dkr9ytjjƒ|j}Wq9d}q9Xn||_||_dS(Ntunknown(R;RRRt__version__R!tversion(RR!R?((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR
s
	cC@s*|jdkr|jSd|j|jfS(NR=s%s %s(R?R!(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyt__str__
sN(R2R3R;R
R@(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR<s	t
OptionDatacB@s#eZd„Zd„Zd„ZRS(cC@s||_d|_g|_dS(N(R!R;R(R'(RR!((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR
s		cC@s|jS(N(R!(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR@scC@st|j|jƒS(N(tcmpR!(Rtother((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyt__cmp__s(R2R3R
R@RD(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRAs		t
DataCollectorcB@s_eZed	d„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d„Zd„ZRS(
cC@sttƒ|_i|_|r*tƒ|_nF|dkrBd|_n.tg|D]}|jddƒ^qLƒ|_dS(Nt-t_(R6R	tuser_aliasesR7tselected_pluginsR;treplace(Rt
no_pluginsRItx((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR
#s	cC@s%|jƒ|jƒ|jƒ|jS(N(RR%RR	(R((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pytcollect.s


cC@sttjdƒ}tjjdƒ}xL|j|ƒD];\}}|jjj|ƒ|r1|jjj|ƒq1q1WdS(Ns"\n(--[A-Za-z0-9-_]+)(?:, (-\S))?\ssglobal-options(	tretcompileRttopic_registryt
get_detailtfindallR	Rtadd(Rt	re_switcht	help_texttlongtshort((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR4scC@syxrtjƒjƒjƒD]X\}}xItj|ƒD]8}|jdƒs5|jj|t	ƒƒj
|ƒPq5q5WqWdS(NRF(RtGlobalConfigtget_aliasesR Rtsplitt
startswithRHt
setdefaultR7RS(Rtaliast	expansionttoken((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR%<s
%cC@s.x'ttjƒƒD]}|j|ƒqWdS(N(RRtall_command_namesR#(RR!((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRCscC@s΄tj|ƒ}t|ƒ}|jƒ}|dk	r‘|jdk	rUt|jkrUdS|jjj	|ƒ}|dkr•t
|ƒ}||jj|<n||_n|jjj|ƒ|jj
|jƒ|jj
tg|jD]>}||jkrέ|j|D]}||jkrύ|^qύqέƒƒ|jƒ}x9t|jƒƒD]%\}	}
|jj
|j|
ƒƒqDWd|ksˆd|jkr°ddjttjjƒƒƒ|_n|S(Nthelps
($cmds %s)R(Rtget_cmd_objectR:tplugin_nameR;RIRR	RtgetR<R)R%textendRRHR&R RRRRPtkeysR+(RR!tcmdtcmd_dataRctplugin_datatcmdaliast	useraliastoptstoptnametopt((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyR#Gs4
"%cC@si}tji||j6ƒ}|j||ƒ}|jƒ|j||jƒƒt|tjƒrπ|j	rπd|j}|j
|ƒ}|rπy|jjƒ|_
Wqνtk
rι}|jjd|jt|ƒjdƒdfƒqνXqπnt|jƒƒS(Ns--%ss*ERROR getting registry keys for '--%s': %ss
i(Rt
get_optparserR!twrap_parsertcleart
add_optiont
short_nameR,tRegistryOptiontenum_switchRdtregistryRfR(tImportErrorR'R)R*RZRtvalues(RRntoptswitchestparserRut	enum_datate((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRls 

	.c@s‡fd†}||_|S(Nc@s%x|D]}t|ƒˆ|<qWdS(N(RA(RltattrsR!(Ry(sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyttweaked_add_options
(Rr(RRyRzR~((RysK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pytwrap_container~s	c@s7|j‰‡‡‡fd†}||_ˆjˆ|ƒS(Nc@sˆjˆˆ||ŽƒS(N(R(RlR}(Rytorig_add_option_groupR(sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyttweaked_add_option_group‡s	(tadd_option_groupR(RRyRzR((RyR€RsK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRp…s		N(
R2R3R5R;R
RMRR%RR#RRRp(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRE!s					%		Rc
C@sktd|d|ƒ}|jƒ}t|d|d|ƒ}|rN|jƒ}	n|jƒ}	|j|	ƒdS(NRKRIR
R(RERMRRRtwrite(
toutR
t
function_onlyRRKRItdcR	tcgtres((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pytbash_completion_functionŽstcmd_bash_completioncB@sŸeZdZejddddeddddƒejd	dd
ddddƒejdddd
eddƒejddedddddƒgZ	d„Z
RS(sDGenerate a shell function for bash command line completion.

    This command generates a shell function which can be used by bash to
    automatically complete the currently typed command when the user presses
    the completion key (usually tab).
    
    Commonly used like this:
        eval "`bzr bash-completion`"
    s
function-nameRstfttypetargnameR!Ras.Name of the generated function (default: _bzr)s
function-onlytos1Generate only the shell function, don't enable itRthiddens&Enable shell code useful for debuggingRs*Enable completions for the selected plugins (default: all plugins)cK@sQd|kr=t|dƒdkr3|d|d<n|d=nttj|dS(NRiRI(tlenR‰tsyststdout(Rtkwargs((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pytrun³s

N(R2R3R4RtOptionR*R;tTruet
ListOptiont
takes_optionsR”(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyRŠ›s	
t__main__cC@s0|jj}|dkr|2n
|j|ƒdS(NRF(RxRIR)(RRntvalueRzRx((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pytplugin_callbackΑstusages%prog [-f NAME] [-o]s--function-names-ftmetavartNAMERas.Name of the generated function (default: _bzr)s--function-onlys-otactiont
store_trues1Generate only the shell function, don't enable its--debugs--no-pluginssDon't load any bzr pluginss--pluginRŒtstringtdestRItdefaulttcallbacks*Enable completions for the selected plugins (default: all plugins)s)script does not take positional argumentsRRK(/t
__future__RRRRRRRRRNR‘tobjectRR6R:R<RARER5R;R‰tCommandRŠR2tlocaletoptparseR›tOptionParserRzRrt
SUPPRESS_HELPt
parse_argsRltargsterrortdictR“t__dict__R R!Ršt	setlocaletLC_ALLRdtload_pluginstinstall_bzr_command_hooksR’(((sK/usr/lib/python2.7/dist-packages/bzrlib/plugins/bash_completion/bashcomp.pyt<module>sX.Ι

m!	
	



Copyright © 2017 || Recoded By Mr.Bumblebee