summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorCatherine Devlin <catherine.devlin@gmail.com>2013-06-15 01:00:17 -0400
committerCatherine Devlin <catherine.devlin@gmail.com>2013-06-15 01:00:17 -0400
commita6856ba742cfb5068524a7198e307d70445e9df5 (patch)
tree501eea7548bcb86e94a3976a5eeef2c51d57d234 /cmd2.py
parent52394456822d84686c50e64487c48872f52e58e9 (diff)
parentf4596afb024f2f388c2ba0479bcf0bb3d55c7d56 (diff)
downloadcmd2-git-a6856ba742cfb5068524a7198e307d70445e9df5.tar.gz
Merged in desaintmartin/cmd2/desaintmartin/fixed-which-calls-being-verbose-to-stder-1369996337663 (pull request #1)
Fixed "which" calls being verbose to stderr.
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2.py b/cmd2.py
index 993af890..0048a102 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -420,8 +420,8 @@ class Cmd(cmd.Cmd):
if sys.platform[:3] == 'win':
editor = 'notepad'
else:
- for editor in ['gedit', 'kate', 'vim', 'emacs', 'nano', 'pico']:
- if subprocess.Popen(['which', editor], stdout=subprocess.PIPE).communicate()[0]:
+ for editor in ['gedit', 'kate', 'vim', 'vi', 'emacs', 'nano', 'pico']:
+ if subprocess.Popen(['which', editor], stdout=subprocess.PIPE, stderr=subprocess.STDOUT).communicate()[0]:
break
colorcodes = {'bold':{True:'\x1b[1m',False:'\x1b[22m'},