Sha256: a59f296453554fedc28fa87bc590132db0f388f9579505844b08a3fdc6033f6f

Contents?: true

Size: 600 Bytes

Versions: 18

Compression:

Stored size: 600 Bytes

Contents

#!/bin/zsh

_pantograph_complete() {
  local word completions
  word="$1"

  # look for Pantfile either in this directory or pantograph/ then grab the lane names
  if [[ -e "Pantfile" ]] then
    file="Pantfile"
  elif [[ -e "pantograph/Pantfile" ]] then
    file="pantograph/Pantfile"
  elif [[ -e ".pantograph/Pantfile" ]] then
    file=".pantograph/Pantfile"
  fi

  # parse 'beta' out of 'lane :beta do', etc
  completions=`cat $file | grep "^\s*lane \:" | awk -F ':' '{print $2}' | awk -F ' ' '{print $1}'`
  completions="$completions
update_pantograph"

  reply=( "${(ps:\n:)completions}" )
}

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
pantograph-0.1.22 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.21 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.20 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.19 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.17 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.16 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.15 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.14 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.13 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.12 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.10 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.8 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.7 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.6 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.4 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.3 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.1 pantograph/lib/assets/completions/completion.zsh
pantograph-0.1.0 pantograph/lib/assets/completions/completion.zsh