Issue #5 resolved

Symbolink inks in $WORKON_HOME

Bertrand Croq
created an issue

I had existing virtualenvs when I installed virtualenvwrapper, so I put symbolink links pointing to these virtualenvs in my $WORKON_HOME directory.

The problem : the workon command didn't show these links in the list.

Here is a proposed patch.

Comments (10)

  1. Doug Hellmann repo owner
    • changed status to open

    I hadn't considered that use case. Your patch looks like a good start but I wonder if we should be doing something smarter there, too, to only find directories that contain an activate script? I'll think about it a bit.

  2. Bertrand Croq reporter

    There is a problem in virtualenvwrapper_show_workon_options, the new line contains an extra ;

    It should be :

    (cd "$WORKON_HOME"; ls */bin/activate) | sed 's|/bin/activate||' | sort

    Once this little fix applied, it works.

  3. Jeff Forcier

    Is there a reason the 'ls' was used instead of adding options to 'find'? Just downloaded 1.13 and found that this breaks my earlier fix, since use of 'ls' causes tab-completion problems on setups where one has colorized 'ls' enabled.

    I'd submit a patch to go back to a (symlink honoring) find command, but want to make sure there's no other angle that I'm missing here.

  4. Doug Hellmann repo owner

    Bah, I forgot the reason we'd switched from ls to begin with. I was trying to fix the new problem and smartly deal with the case where there were things in $WORKON_HOME that were not virtualenvs. I'll look at find again, sorry for that.

  5. Jeff Forcier

    No problem! I'm surprised color ls is such an edge case (or maybe I'm just doing it wrong...) but no hard feelings :D Let me know if I can chip in, otherwise I'll wait for a fix.

  6. Log in to comment