aboutsummaryrefslogtreecommitdiffstats
path: root/bin/editor
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2013-03-02 14:58:09 +0000
committerNicolas Vigier <boklm@mageia.org>2013-03-02 14:58:09 +0000
commitbe8c0a5a9a409923e8c2fb0a4d88e4730a01e165 (patch)
treec448a143605b0f4331e842d9ddfa43981e45186a /bin/editor
parente42e2ad2249a4c6a7787379f04bdc24e95c784a5 (diff)
downloadcommon-data-be8c0a5a9a409923e8c2fb0a4d88e4730a01e165.tar
common-data-be8c0a5a9a409923e8c2fb0a4d88e4730a01e165.tar.gz
common-data-be8c0a5a9a409923e8c2fb0a4d88e4730a01e165.tar.bz2
common-data-be8c0a5a9a409923e8c2fb0a4d88e4730a01e165.tar.xz
common-data-be8c0a5a9a409923e8c2fb0a4d88e4730a01e165.zip
bin/editor: don't open console editors with xvt
This wasn't working anyway because the filename was not passed inside the -e argument so it was ignored.
Diffstat (limited to 'bin/editor')
-rwxr-xr-xbin/editor10
1 files changed, 3 insertions, 7 deletions
diff --git a/bin/editor b/bin/editor
index bb30a00..f5045e7 100755
--- a/bin/editor
+++ b/bin/editor
@@ -40,16 +40,12 @@ if [[ -z "$TEXTEDITOR" ]]; then
if [[ -z "$TEXTEDITOR" ]]; then
EMACS=`/usr/sbin/update-alternatives --list emacs`
if [[ -n "$EMACS" ]]; then
- if [[ `basename "$EMACS"` = "emacs-nox" ]]; then
- TEXTEDITOR="xvt -e emacs"
- else
- TEXTEDITOR="emacs"
- fi
+ TEXTEDITOR="emacs"
fi
fi
- [[ -z "$TEXTEDITOR" ]] && which vim > /dev/null 2>&1 && TEXTEDITOR="xvt -e vim"
- [[ -z "$TEXTEDITOR" ]] && which nano > /dev/null 2>&1 && TEXTEDITOR="xvt -e nano"
+ [[ -z "$TEXTEDITOR" ]] && which vim > /dev/null 2>&1 && TEXTEDITOR="vim"
+ [[ -z "$TEXTEDITOR" ]] && which nano > /dev/null 2>&1 && TEXTEDITOR="nano"
fi
if [[ -n "$TEXTEDITOR" ]]; then