sensible-editor
pager, sensible-browser - sensible editing, paging, and web browsing
see also :
sensible-browser - select-editor
Synopsis
sensible-editor
[OPTIONS...]
sensible-pager [OPTIONS...]
sensible-browser url
add an example, a script, a trick and tips
examples
source
fi
sensible-editor $@
cat $FILE | ermahgit-translate >
/tmp/$$.ermahgit.txt
mv /tmp/$$.ermahgit.txt $FILE
source
if which emacs && which emacsclient ; then
echo emacsclient ${(kv)args} "$@"
elif which sensible-editor ;
then
sensible-editor "$@"
else
vim "$@"
fi
source
echo >&2 "Vault
\"$1\" not found."
exit 1
fi
if which sensible-editor
>/dev/null
then
ED=sensible-editor
else
ED="${EDITOR:-editor}"
source
file=$HOME/.bin/$1
fi
sensible-editor $file
chmod a+x $file
source
exit 1
fi
sensible-editor $@
cat $FILE | ermahgit-translate >
/tmp/$$.ermahgit.txt
mv /tmp/$$.ermahgit.txt $FILE
source
elif which sensible-editor ;
then
sensible-editor "$@"
else
vim "$@"
fi
source
if which sensible-editor
>/dev/null
then
ED=sensible-editor
else
ED="${EDITOR:-editor}"
fi
source
alternate_editors=( em zile mg jove sensible-editor vim joe
)
foreach editor ( $alternate_editors )
do
if which $editor
>& /dev/null ; then
description
sensible-editor,
sensible-pager and sensible-browser make
sensible decisions on which editor, pager, and web browser
to call, respectively. Programs in Debian can use these
scripts as their default editor, pager, or web browser or
emulate their behavior.
see also
Documentation
of the EDITOR, VISUAL, PAGER, and BROWSER variables in
environ and select-editor for changing a
user’s default editor