Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .