]> git.donarmstrong.com Git - bin.git/blob - sane_editor
added sane_editor and sa
[bin.git] / sane_editor
1 #!/bin/sh
2
3 # Order of preference
4 # gnuclient
5 # jed
6 # juno
7 # vi
8 # nano
9 # ed
10
11 # modify the gsrvdir check to search for directories that are owned by me
12 if [ -x /usr/bin/gnuclient ] && [ -x /usr/bin/emacs ]; then
13     if ( gnuclient -batch < /dev/null >/dev/null); then
14         exec gnuclient "$@";
15     fi;
16 fi;
17 if [ -x /usr/bin/jed ]; then
18     exec jed "$@";
19 fi;
20 if [ -x /usr/bin/juno ]; then
21     exec juno "$@";
22 fi;
23 if [ -x /usr/bin/vi ]; then
24     exec vi "$@";
25 fi;
26 if [ -x /usr/bin/nano ]; then 
27     exec nano "$@";
28 fi;
29 if [ -x /usr/bin/ed ]; then
30     exec ed "$@";
31 fi;
32 echo "Unable to find a suitable editor" >/dev/stderr;
33 exit 1;