From 75baad96098e75e471bf9b5ca308c520d5a6ec43 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sat, 13 Dec 2008 13:30:20 +0100 Subject: Updated function and completion file headers --- etc/completions/_devtodo | 6 +++--- etc/completions/_fan | 7 +++---- etc/completions/_fbi | 6 +++--- etc/completions/_git-hook | 3 +++ etc/completions/_gtd-move | 1 + etc/completions/_initd | 6 ++++-- etc/completions/_iwlist | 4 ++-- etc/completions/_pkill | 6 ++++-- etc/completions/_sort | 3 +++ etc/completions/_sshfs | 1 + etc/completions/_toshset | 4 ++-- etc/functions/countdown | 5 +++++ etc/functions/git-hook | 2 ++ etc/functions/gtd-move | 3 +++ etc/functions/off | 4 ++++ etc/functions/progress | 2 ++ etc/functions/put | 2 ++ etc/functions/rtab | 7 +++---- 18 files changed, 50 insertions(+), 22 deletions(-) diff --git a/etc/completions/_devtodo b/etc/completions/_devtodo index 0336654..79f6fe1 100644 --- a/etc/completions/_devtodo +++ b/etc/completions/_devtodo @@ -1,7 +1,7 @@ #compdef devtodo todo tda tde tdd tdr -## completion for devtodo 0.1.20 -## Daniel Friesel -## https://derf.homelinux.org/~derf/dotfiles/completion/_devtodo +## completion for devtodo 0.1.20 +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL typeset -a arg_generic arg_add todo_opts \ priorities diff --git a/etc/completions/_fan b/etc/completions/_fan index 81f28fd..9549a35 100644 --- a/etc/completions/_fan +++ b/etc/completions/_fan @@ -1,9 +1,8 @@ #compdef fan ## vim:ft=zsh -## fan completion -## Daniel Friesel -## https://derf.homelinux.org/~derf/dotfiles/completion/_fan -## see also: https://derf.homelinux.org/~derf/code/fan +## fan completion +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL local arguments_thinkpad arguments_generic diff --git a/etc/completions/_fbi b/etc/completions/_fbi index 63e2d20..8af7fb0 100644 --- a/etc/completions/_fbi +++ b/etc/completions/_fbi @@ -1,7 +1,7 @@ #compdef fbi -## completion for fbi 2.07-1, based on fbi -h -## Daniel Friesel -## https://derf.homelinux.org/~derf/dotfiles/completion/_fbi +## completion for fbi 2.07-1, based on fbi -h +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL typeset -a arguments diff --git a/etc/completions/_git-hook b/etc/completions/_git-hook index 20308c6..cdf15a7 100644 --- a/etc/completions/_git-hook +++ b/etc/completions/_git-hook @@ -1,4 +1,7 @@ #compdef git-hook +## Completion for the git-hook function, see ../functions/git-hook +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL typeset hook_dir expl diff --git a/etc/completions/_gtd-move b/etc/completions/_gtd-move index e9e7bc5..e8cc804 100644 --- a/etc/completions/_gtd-move +++ b/etc/completions/_gtd-move @@ -1,4 +1,5 @@ #compdef gtd-move +## completion for the gtd-move function, see ../functions/gtd-move typeset -a arguments diff --git a/etc/completions/_initd b/etc/completions/_initd index 3da387c..61abd04 100644 --- a/etc/completions/_initd +++ b/etc/completions/_initd @@ -1,8 +1,12 @@ #compdef Start Restart Stop Reload ## vim:ft=zsh +## Completion for the Start, Stop etc. functions introduced in ../function +## ## Note: This script parses the files in /etc/init.d to generate the matches. ## If you'd prefer to just have all the files in /etc/init.d as arguments, ## write "zstyle ':completion:*:*:_initd' all-files true" into your zshrc +## +## Most of this has been taken from the _init_d function provided with zsh typeset arguments file bang typeset specific=${service:l} @@ -14,8 +18,6 @@ if zstyle -t ':completion:*:*:_initd' all-files; then return 0 fi -# Most of the loop's content has been taken from the _init_d -# completion function provided with zsh for file in /etc/init.d/*(*); { read -u0 -k2 bang < $file && [[ $bang == '#!' ]] && [[ -n ${${(j:|:s:|:)${(M)${(f)"$(< $file)"}:#[[:blank:]]#(\'|)(${~action}[[:blank:]]#\|[[:blank:]]#)#${~specific}([[:blank:]]#\|[[:blank:]]#${~action})#(\'|)\)}}//[^-a-z_]} ]] && diff --git a/etc/completions/_iwlist b/etc/completions/_iwlist index 99904ff..6ca0846 100644 --- a/etc/completions/_iwlist +++ b/etc/completions/_iwlist @@ -1,7 +1,7 @@ #compdef iwlist ## iwlist completion as requested by mxey -## Written 2008 by Daniel Friesel -## https://derf.homelinux.org/~derf/dotfiles/zsh/completions/_iwlist +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL function _iwlist_options () { typeset -a options diff --git a/etc/completions/_pkill b/etc/completions/_pkill index a93173a..35f5082 100644 --- a/etc/completions/_pkill +++ b/etc/completions/_pkill @@ -1,6 +1,8 @@ #compdef pkill pgrep -## completion for pkill -## Written 2008 by Daniel Friesel +## completion for pkill and pgrep +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL + ## Not finished ## * Some options lack completion / their completion is inspecific diff --git a/etc/completions/_sort b/etc/completions/_sort index 8c49a26..6d6bc55 100644 --- a/etc/completions/_sort +++ b/etc/completions/_sort @@ -1,4 +1,7 @@ #compdef sort +## Quick, dirty and probably incomplete sort completion +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL typeset -a arguments diff --git a/etc/completions/_sshfs b/etc/completions/_sshfs index e06f8d4..6a6f150 100644 --- a/etc/completions/_sshfs +++ b/etc/completions/_sshfs @@ -2,6 +2,7 @@ ## Since _user_at_host was a little inflexible, ## I ripped the responsible parts from _ssh. ## In future, sshfs should be handled by _ssh as well +## Copyright goes to whoever wrote _ssh (if in doubt, the zsh dudes) typeset expl lstate tmp diff --git a/etc/completions/_toshset b/etc/completions/_toshset index 8393fc7..6c48d45 100644 --- a/etc/completions/_toshset +++ b/etc/completions/_toshset @@ -1,8 +1,8 @@ #compdef toshset ## vim:ft=zsh ## completion for toshset 1.73-2, based toshset(1) and a Toshiba Satellite 2670 -## Daniel Friesel -## https://derf.homelinux.org/~derf/dotfiles/completion/_toshset +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL local arguments diff --git a/etc/functions/countdown b/etc/functions/countdown index a4c4a26..c52f418 100755 --- a/etc/functions/countdown +++ b/etc/functions/countdown @@ -1,4 +1,9 @@ ## vim:ft=zsh +## Countdown to a specific date/time +## Usage: countdown +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL + autoload check_com typeset -i beep=0 typeset -i seconds diff --git a/etc/functions/git-hook b/etc/functions/git-hook index 3d0c705..86c2bbb 100755 --- a/etc/functions/git-hook +++ b/etc/functions/git-hook @@ -1,5 +1,7 @@ ## vim:ft=zsh ## Small function to help with git hooks +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL autoload fdie typeset hook_dir action=${1=list} hook=$2 diff --git a/etc/functions/gtd-move b/etc/functions/gtd-move index c9eee09..56a861d 100755 --- a/etc/functions/gtd-move +++ b/etc/functions/gtd-move @@ -1,4 +1,7 @@ ## vim:ft=zsh +## Helper for my gtd system +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL if [[ ${#*} != 3 ]] { echo "Usage: gtd-move " diff --git a/etc/functions/off b/etc/functions/off index 97363dc..12555d3 100755 --- a/etc/functions/off +++ b/etc/functions/off @@ -1,4 +1,8 @@ ## vim:ft=zsh +## Small shutdown/reboot wrapper to work together with my other tools +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL + autoload warn fdie typeset filesystem line IFS=$'\n' typeset -a filesystems diff --git a/etc/functions/progress b/etc/functions/progress index d23caea..d472e54 100644 --- a/etc/functions/progress +++ b/etc/functions/progress @@ -1,6 +1,8 @@ ## vim:ft=zsh ## progress - draw a simple progress bar ## Usage: progress [left description] [right discription] +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL typeset -i current=$1 typeset -i max=$2 diff --git a/etc/functions/put b/etc/functions/put index 93ecec0..a24be62 100755 --- a/etc/functions/put +++ b/etc/functions/put @@ -2,6 +2,8 @@ ## put - make a file available via HTTP ## supports as many 'failover' hosts as an array can hold ## Usage: put +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL autoload check_com fdie warn typeset hostname diff --git a/etc/functions/rtab b/etc/functions/rtab index 150aee4..920f881 100755 --- a/etc/functions/rtab +++ b/etc/functions/rtab @@ -1,8 +1,7 @@ ## vim:ft=zsh -## reverse tabbing -## written 2008 by Daniel Friesel -## Licence: You just DO WHAT THE FUCK YOU WANT TO. -## https://derf.homelinux.org/~derf/dotfiles/zsh/functions/rtab +## reverse tabbing, useful in the prompt +## Copyright (C) 2008 by Daniel Friesel +## License: WTFPL ## CAVEAT: directory-names containing two or more consecutive spaces ## are not yet supported -- cgit v1.2.3