diff options
author | desaintmartin <cedric@desaintmartin.fr> | 2013-05-31 10:33:12 +0000 |
---|---|---|
committer | desaintmartin <cedric@desaintmartin.fr> | 2013-05-31 10:33:12 +0000 |
commit | 1c860cc7c0b27bf93f169ca81ae476a818903a6c (patch) | |
tree | 501eea7548bcb86e94a3976a5eeef2c51d57d234 | |
parent | f56abf5aab79e934896ee353070e7fa8fddaf619 (diff) | |
download | cmd2-hg-desaintmartin/fixed-which-calls-being-verbose-to-stder-1369996337663.tar.gz |
Fixed "which" calls being verbose to stderr.desaintmartin/fixed-which-calls-being-verbose-to-stder-1369996337663
Add "vi" to the list of possible editors.
-rwxr-xr-x | cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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'}, |