Skip to content

Instantly share code, notes, and snippets.

@manavid
Created December 8, 2009 11:44
Show Gist options
  • Save manavid/251581 to your computer and use it in GitHub Desktop.
Save manavid/251581 to your computer and use it in GitHub Desktop.

Revisions

  1. manavid revised this gist Dec 8, 2009. 1 changed file with 2 additions and 3 deletions.
    5 changes: 2 additions & 3 deletions gistfile1.sh
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,14 @@
    should be placed to: ~/.zsh/functions/service :
    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 to: ~/.zsh/functions/_service :
    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
  2. manavid renamed this gist Dec 8, 2009. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. manavid created this gist Dec 8, 2009.
    15 changes: 15 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    should be placed to: ~/.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 to: ~/.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