Skip to content

Launch shpec as zsh plugin is limiting #102

Description

@ezh

Right now shpec is alias

which shpec
shpec: aliased to zsh -c 'disable -r end; . /full/path/to/shpec'
  1. this prevents to pass arguments to shpec
    shpec -v, shpec file is not working
  2. this drop the current zsh environment with all defined functions

I offer to use function instead of alias.
We may guard execution with ()

(disable -r time;which time); which time
/usr/bin/time
time: shell reserved word

It maybe something like

__shpec_location="$(dirname $0:A)/bin/shpec"
shpec() { (disable -r end; . $__shpec_location $@) }

There is a problem with multiple arguments, but this is different issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions