Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've started using virtualenv for my Python projects. Since the working directory for my projects is now deeply nested, the path has started to take up half of my screen!

Is it possible to somehow have PowerShell condense the path to the current working directory, from something like PS C:\Users\kRON\Desktop\Current work\Python\dsp\src> to PS C:\Users\kRON\Deskto~1\Curren~2\Python\dsp\src> or, better yet, to match C:\Users\kRON\Desktop\Current work\Pythonand just replace it with ~python to get PS ~python\dsp\src>?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Yes.

Given a function or cmdlet to summarise the path, this can be used in your prompt function or in format files.

E.g. TFS PowerToys does this with a helper it installs using a <scriptBlock> in its .format.xml file.

share|improve this answer
    
The prompt function, so that's what it's called. Great ^^! –  Filip Dupanović Mar 13 '10 at 17:49

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.