Sha256: 3ac4337f6225b5861693c90014f3c5106c9492a3d4ae5e8200b4c666d948ce67

Contents?: true

Size: 682 Bytes

Versions: 50

Compression:

Stored size: 682 Bytes

Contents

#!/usr/bin/env bash

function acd {
    local pkg_path
    pkg_path=$(autoproj locate $1)

    if [ $? != 0 ]; then
      return 1
    else
      pkg_path=$(echo $pkg_path | tail -1)
      cd $pkg_path
      return 0
    fi
}

_autoproj_installed_packages() {
    ruby 2>/dev/null <<EOF | while IFS= read -r; do packages+=("$REPLY"); done

begin
    require 'autoproj'

    path = Autoproj.workspace.installation_manifest_path
    manifest = Autoproj::InstallationManifest.new(path)

    manifest.load
    manifest.each_package { |pkg| puts pkg.name }
rescue
end
EOF

    compadd -a packages
}

_acd () {
  _arguments -s "1:package:_autoproj_installed_packages"
}

compdef _acd acd

Version data entries

50 entries across 25 versions & 1 rubygems

Version Path
autoproj-2.17.0 shell/autoproj_zsh
autoproj-2.17.0 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.16.0 shell/autoproj_zsh
autoproj-2.16.0 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.15.3 shell/autoproj_zsh
autoproj-2.15.3 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.15.2 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.15.2 shell/autoproj_zsh
autoproj-2.15.1 shell/autoproj_zsh
autoproj-2.15.1 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.15.0 shell/autoproj_zsh
autoproj-2.15.0 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.14.0 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.14.0 shell/autoproj_zsh
autoproj-2.13.0 shell/autoproj_zsh
autoproj-2.13.0 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.12.1 shell/autoproj_zsh
autoproj-2.12.1 lib/autoproj/templates/helpers.zsh.erb
autoproj-2.12.0 shell/autoproj_zsh
autoproj-2.12.0 lib/autoproj/templates/helpers.zsh.erb