new repository without sensitive information

This commit is contained in:
Alexander Gehrke 2013-03-15 08:37:33 +01:00
commit 57fa0afede
51 changed files with 1883 additions and 0 deletions

3
compdef/_aliases Normal file
View file

@ -0,0 +1,3 @@
#compdef aliases
_files -W /etc/zsh/aliases/

12
compdef/_awpman Normal file
View file

@ -0,0 +1,12 @@
#compdef awpman
typeset -A opt_args
local context state line
confpath=${WPMANSETS:-~/.config/wpman}
_arguments \
"1:Action:(load save)"\
"2:Setting File:_files -W $confpath"
# "load:Setting File:_files -W $confpath" \
# "save:Setting File:_files -W $confpath" \

103
compdef/_cryptsetup Normal file
View file

@ -0,0 +1,103 @@
#compdef cryptsetup
## completion for cryptsetup 1.3.0, based on cryptsetup(1)
function _cryptsetup_action {
typeset -a actions
actions=(
'create:create a mapping'
'remove:remove an existing mapping'
'status:report mapping status'
'resize:resize an active mapping'
'luksFormat:Initialize a LUKS partition'
'luksOpen:Open LUKS partition'
'luksClose:remove an existing mapping'
'luksSuspend:suspend active device'
'luksResume:resume suspended device'
'luksAddKey:add a new key'
'luksRemoveKey:remove a key'
'luksChangeKey:change a key'
'luksKillSlot:wipe key from slot'
'luksUUID:print/change device UUID'
'isLuks:check if device is a LUKS partition'
'luksDump:dump header information'
'luksHeaderBackup:store binary backup of headers'
'luksHeaderRestore:restore header backup'
)
_describe action actions
}
function _cryptsetup_device {
typeset expl
_wanted file expl device \
_files
}
function _cryptsetup_mapping {
typeset expl
_wanted file expl 'mapping name' \
_path_files -W /dev/mapper
}
function _cryptsetup_arguments {
case ${words[1]} in
create)
_arguments ':mapping:_cryptsetup_mapping' ':device:_cryptsetup_device'
;;
remove|status|resize|luksClose|luksSuspend|luksResume)
_arguments ': :_cryptsetup_mapping'
;;
luks(AddKey|RemoveKey|DelKey|UUID|Dump)|isLuks)
_arguments ': :_cryptsetup_device'
;;
luks(Format|AddKey|RemoveKey|ChangeKey))
_arguments ': :_cryptsetup_device' ':key file:_files'
;;
luksKillSlot)
_arguments ': :_cryptsetup_device' ':key slot number'
;;
luksOpen)
_arguments ': :_cryptsetup_device' ': :_cryptsetup_mapping'
;;
esac
}
function _cryptsetup {
_arguments \
'(-v --verbose)'{-v,--verbose}'[enable verbose mode]' \
'--debug[enable debug mode]' \
'(-h --hash)'{-h,--hash}'[hash algorithm]:hash algorithm' \
'(-c --cipher)'{-c,--cipher}'[set cipher]:cipher specification' \
'(-y --verify-passphrase)'{-y,--verify-passphrase}'[query for password twice]' \
'(-d --key-file)'{-d,--key-file}'[set keyfile]:key file:_files' \
'(-l --keyfile-size)'{-l,--keyfile-size}'[set keyfile size]:bytes' \
'--new-keyfile-size[set new keyfile size (luksAddKey)]:bytes' \
'--master-key-file[set master key]:key file:_files' \
'--dump-master-key[dump luks master key]' \
'(--use-urandom)--use-random[use /dev/random to generate volume key]' \
'(--use-random)--use-urandom[use /dev/urandom to generate volume key]' \
'(-S --key-slot)'{-S,--key-slot}'[select key slot]:key slot' \
'(-s --key-size)'{-s,--key-size}'[set key size]:bits' \
'(-b --size)'{-b,--size}'[force device size]:sectors' \
'(-o --offset)'{-o,--offset}'[set start offset]:sectors' \
'(-p --skip)'{-p,--skip}'[data to skip at beginning]:sectors' \
'--readonly[set up read-only mapping]' \
'(-i --iter-time)'{-i,--iter-time}'[set password processing duration]:milliseconds' \
'(-q --batch-mode)'{-q,--batch-mode}'[do not ask for confirmation]' \
'(-t --timeout)'{-t,--timeout}'[set password prompt timeout]:seconds' \
'(-T --tries)'{-T,--tries}'[set maximum number of retries]:maximum retries' \
'--align-payload[set payload alignment]:sectors' \
'--uuid[set device UUID]:uuid' \
'--version[show version information]' \
':action:_cryptsetup_action' \
'*::arguments:_cryptsetup_arguments'
}
_cryptsetup "$@"

3
compdef/_games Normal file
View file

@ -0,0 +1,3 @@
#compdef game
_files -W $HOME/games/bin/

70
compdef/_jpptodo Normal file
View file

@ -0,0 +1,70 @@
#compdef jpptodo
typeset -A opt_args
local context state line
_jpp_find_todo_path() {
local todopath=$PWD
while true; do
[ -e "$todopath/TODO" ] && break;
[ "$todopath" = "/" ] && todopath=$PWD && break;
todopath=$(realpath "$todopath/..")
done
echo $todopath
}
_jpp_snums() {
local todopath=$(_jpp_find_todo_path)
[ -e "$todopath/TODO" ] || return;
_values -w 'S-Nummern' \
$(awk "$1"'{ printf "%s ", $1 }' $todopath/TODO)
}
_jpp_done() {
case "$state" in
arg2)
_values -w -s ' ' 'Aufgaben' \
'1[Model]' \
'2[Verwaltung]' \
'3[Import Export]' \
'4[Generierung]' \
'5[GUI]' \
'(1 2 3 4 5)all[Alle]'
;;
*)
_jpp_snums "/\s0\s/"
;;
esac
}
_jpptodo() {
_arguments "1:Commands:->commands" \
"2: :->arg1" \
"*: :->arg2" \
case "$state" in
commands)
_arguments '1:Commands:(new done todo lock run unlock)'\
'-o[offline mode]' \
'-d[debug]'
;;
*)
case $words[2] in
lock)
_jpp_snums "/open$/"
;;
unlock)
_jpp_snums "!/open$/"
;;
done)
_jpp_done
;;
run)
_jpp_snums
;;
esac
;;
esac
}
_jpptodo "$@"

3
compdef/_pl Normal file
View file

@ -0,0 +1,3 @@
#compdef pl
_files -W /code/lib/php/

3
compdef/_pp Normal file
View file

@ -0,0 +1,3 @@
#compdef pp
_files -W /code/projects

3
compdef/_ppsh Normal file
View file

@ -0,0 +1,3 @@
#compdef pp
_files -W /code/projects/shell/ -/

3
compdef/_pumount Normal file
View file

@ -0,0 +1,3 @@
#compdef pumount
_files -W /media

3
compdef/_pw Normal file
View file

@ -0,0 +1,3 @@
#compdef pw
_files -W /www/ -/

3
compdef/_py Normal file
View file

@ -0,0 +1,3 @@
#compdef py
_files -W /code/projects/php/

3
compdef/_ser Normal file
View file

@ -0,0 +1,3 @@
#compdef ser
_path_files -/ -W /mm/video/series

3
compdef/_toggle Normal file
View file

@ -0,0 +1,3 @@
#compdef toggle
_files -W /etc/init.d

25
compdef/_vcs Normal file
View file

@ -0,0 +1,25 @@
#compdef gpl gst
_gpl() {
if [[ "$VCS_DETECTED" == "hg" ]]; then
words=( hg pull "${(@)nw}"); (( CURRENT++ )); _hg
elif [[ "$VCS_DETECTED" == "hg" ]]; then
words=( svn update "${(@)nw}"); (( CURRENT++ )); _svn
else
words=( git pull "${(@)nw}"); (( CURRENT++ )); service=git; _git
fi
}
_gst() {
words=( git status "${(@)nw}"); (( CURRENT++ )); service=git; _git
}
nw=("${(@)words[2,$]}")
case "$service" in
gpl)
_gpl "$@" && return 0
;;
gst)
_gst "$@" && return 0
;;
esac

12
compdef/_wpman Normal file
View file

@ -0,0 +1,12 @@
#compdef wpman
typeset -A opt_args
local context state line
confpath=${WPMANSETS:-~/.config/wpman}
_arguments \
"1:Action:(load save)"\
"2:Setting File:_files -W $confpath"
# "load:Setting File:_files -W $confpath" \
# "save:Setting File:_files -W $confpath" \

3
compdef/_wvv Normal file
View file

@ -0,0 +1,3 @@
#compdef wvv
_files -W ~/.config/wvv