Issue #111 resolved

Creating project with template actually doesn't running template hook on zsh

Dmitry Kukushkin avatarDmitry Kukushkin created an issue

When creating project with command {{{ mkproject -t TEMPLATE_NAME PROJECT_NAME}}}, hook tries to install TEMPLATE_NAME with unwanted forward space, such as {{{--name<space><space>TEMPLATE_NAME}}} instead of {{{--name<space>TEMPLATE_NAME}}}.

zsh version is 4.3.12 (i386-apple-darwin11.1.0)

Comments (9)

  1. Doug Hellmann

    Are you writing a template? I don't understand what the problem actually is. The amount of space between arguments on a command line shouldn't matter, but I don't see an extra space when I use any of the templates I have written. Can you provide some sample code that I can use to reproduce the problem so I can better understand the issue?

  2. Dmitry Kukushkin

    First of all, this problem seen only in zsh, and only in virtualenvwrapper==2.9, in 2.8+virtualenvwrapper.project all works fine.

    You can try to install virtualenvwrapper.django, and create project with mkproject -t django djproject

    Second, as i can see, problem in function mkproject, in arg parsing. There is my output:

    $ mkproject -t django djproject
    New python executable in djproject/bin/python
    Installing distribute.......................done.
    Installing pip...............done.
    virtualenvwrapper.user_scripts creating /Users/xobb1t/.virtualenvs/djproject/bin/predeactivate
    virtualenvwrapper.user_scripts creating /Users/xobb1t/.virtualenvs/djproject/bin/postdeactivate
    virtualenvwrapper.user_scripts creating /Users/xobb1t/.virtualenvs/djproject/bin/preactivate
    virtualenvwrapper.user_scripts creating /Users/xobb1t/.virtualenvs/djproject/bin/postactivate
    virtualenvwrapper.user_scripts creating /Users/xobb1t/.virtualenvs/djproject/bin/get_env_details
    Creating /Users/xobb1t/Sites/djproject
    Setting project for djproject to /Users/xobb1t/Sites/djproject
    
    Applying template  django
    

    As you can see, in last string, there is one unnecessary space in template name.

  3. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.