diff options
author | Alan Pearce | 2016-06-26 17:29:22 +0200 |
---|---|---|
committer | Alan Pearce | 2016-06-26 17:29:22 +0200 |
commit | 61a885bece9549f994731b9017c00491b1cb6499 (patch) | |
tree | f84f2c24a6c078aaafc3338bcdca91cdf8f525ff /tag-zsh/config/zsh/functions/runit | |
parent | 32c46b315483ec2f58f14acd5cc3d9145c65c65c (diff) | |
parent | 097663cb10d0e8c244063af28295cff6d686f1bb (diff) | |
download | dotfiles-61a885bece9549f994731b9017c00491b1cb6499.tar.lz dotfiles-61a885bece9549f994731b9017c00491b1cb6499.tar.zst dotfiles-61a885bece9549f994731b9017c00491b1cb6499.zip |
Re-make zsh configuration
Start using zplug with the bare minimum of extra configuration
Diffstat (limited to 'tag-zsh/config/zsh/functions/runit')
-rw-r--r-- | tag-zsh/config/zsh/functions/runit/_sv | 7 | ||||
-rw-r--r-- | tag-zsh/config/zsh/functions/runit/getservicedir | 2 | ||||
-rw-r--r-- | tag-zsh/config/zsh/functions/runit/linksv | 16 | ||||
-rw-r--r-- | tag-zsh/config/zsh/functions/runit/renamesv | 36 |
4 files changed, 0 insertions, 61 deletions
diff --git a/tag-zsh/config/zsh/functions/runit/_sv b/tag-zsh/config/zsh/functions/runit/_sv deleted file mode 100644 index bf98b3e..0000000 --- a/tag-zsh/config/zsh/functions/runit/_sv +++ /dev/null @@ -1,7 +0,0 @@ -#compdef sv - -_arguments -A -S -s \ - '-v[wait up to 7 seconds for the command to take effect. (up|down|term|once|cont|exit)]' \ - '-w+[wait for %n seconds]: :_guard "[0-9]#" "numeric value"' \ - '1:command:(status up down once pause cont hup alarm interrupt quit 1 2 term kill exit start stop restart shutdown force-stop force-reload force-restart force-shutdown check)' \ - '*:installed service:_files -W ${SVDIR:-/service}' diff --git a/tag-zsh/config/zsh/functions/runit/getservicedir b/tag-zsh/config/zsh/functions/runit/getservicedir deleted file mode 100644 index 2e5d961..0000000 --- a/tag-zsh/config/zsh/functions/runit/getservicedir +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env zsh -print ${$(readlink ${SVDIR:-/service}/$1):h} \ No newline at end of file diff --git a/tag-zsh/config/zsh/functions/runit/linksv b/tag-zsh/config/zsh/functions/runit/linksv deleted file mode 100644 index 7ee7109..0000000 --- a/tag-zsh/config/zsh/functions/runit/linksv +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env zsh - -if [[ -z $1 ]]; then - echo "No service specified" - return 64 -fi - - -if [[ ! -x $1 ]]; then - echo "Service does not exist in current directory" - return 1 -fi - -mv $1{,.old} -ln -s =sv $1 -chmod -h a-w $1 diff --git a/tag-zsh/config/zsh/functions/runit/renamesv b/tag-zsh/config/zsh/functions/runit/renamesv deleted file mode 100644 index dba1098..0000000 --- a/tag-zsh/config/zsh/functions/runit/renamesv +++ /dev/null @@ -1,36 +0,0 @@ -#!/usr/bin/env zsh -local svdir=${SVDIR:-/service} -if [[ -z $1 || -z $2 ]]; then - echo "Usage: $0 source target" - return 64 -fi - -if [[ ! -h $svdir/$1 ]]; then - echo $svdir/$1 does not exist - return 2 -fi - -if [[ -e $svdir/$2 ]]; then - echo $svdir/$2 already exists - return 3 -fi - -local servicedir=`getservicedir` - -if [[ ! ( -w $svdir && -w $servicedir ) ]]; then - echo $svdir or $servicedir is not writeable -fi - -# The service doesn't have to be stopped as removing the link will do that -# However, running the same service twice isn't a great idea, so wait here -sv stop $1 - -rm -f $svdir/$1 || return - -mv $servicedir/{$1,$2} || return - -ln -s {$servicedir,$svdir}/$2 || return - -sv start $2 - -return |