Skip to content

Instantly share code, notes, and snippets.

@manavid
Created December 8, 2009 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save manavid/251581 to your computer and use it in GitHub Desktop.
Save manavid/251581 to your computer and use it in GitHub Desktop.
should be placed in ~/.zsh/functions/service :
#compdef service
if [ -z $1 ]; then
echo "Usage: service <service_name>"
else
/usr/local/etc/rc.d/$1 $2
fi
should be placed in ~/.zsh/functions/_service :
#compdef service
_files -W /usr/local/etc/rc.d/
usage: service<tab> will list all services under /usr/local/etc/rc.d
usage: service nginx status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment