Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save chris-se/dedf35cc6d92405f4416 to your computer and use it in GitHub Desktop.
Save chris-se/dedf35cc6d92405f4416 to your computer and use it in GitHub Desktop.
From 119b1112825b76fa74fd38372af70484ddf7065e Mon Sep 17 00:00:00 2001
From: Christian Seiler <christian@iwakd.de>
Date: Tue, 15 Jul 2014 17:14:10 +0200
Subject: [PATCH] Respect EDITOR and PAGER environment variables
Make crmsh properly respect EDITOR and PAGER environment variables,
which did not work properly before.
---
modules/config.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/modules/config.py b/modules/config.py
index 3ab2a49..beb226f 100644
--- a/modules/config.py
+++ b/modules/config.py
@@ -166,8 +166,8 @@ class opt_color(object):
DEFAULTS = {
'core': {
- 'editor': opt_program('$EDITOR', ('vim', 'vi', 'emacs', 'nano')),
- 'pager': opt_program('$PAGER', ('less', 'more', 'pg')),
+ 'editor': opt_program('EDITOR', ('vim', 'vi', 'emacs', 'nano')),
+ 'pager': opt_program('PAGER', ('less', 'more', 'pg')),
'user': opt_string(''),
'skill_level': opt_choice('expert', ('operator', 'administrator', 'expert')),
'sort_elements': opt_boolean('yes'),
--
1.7.10.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment