fabric/fabric — pull request #609 by 3point2 (2012-04-05 14:53:52+00:00)
Title: allow a sudo_prefix that doesn't include sudo_prompt

I added a NOPASSWD entry in my sudoers file to allow a particular command to be run as root. as per http://stackoverflow.com/questions/3737003/can-i-prevent-fabric-from-prompting-me-for-a-sudo-password , I had to add shell=False to run the command 'as-is'.

However, with the latest version of Fabric (1.4.0), it's not possible to prevent Fabric from passing the "-p" option to sudo, which makes it ask for a password even if none is needed.

I tried setting env.sudo_prefix, but this doesn't work because _sudo_prefix() in operations.py does
```
prefix = env.sudo_prefix % env.sudo_prompt
```
In other words, the sudo_prefix string has to contain a '%s' for interpolation.

Using the approach in this pull request will also make it easier to document sudo_prefix and I think making all env vars available to sudo_prefix is cool, especially since you're planning to document it (https://github.com/fabric/fabric/issues/564)