File: sensible-editor

package info (click to toggle)
debianutils 1.16.2woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 156 kB
  • ctags: 36
  • sloc: ansic: 609; sh: 344; makefile: 50
file content (8 lines) | stat: -rw-r--r-- 213 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
#!/bin/bash
shopt -s execfail
exec ${VISUAL:-${EDITOR:-editor}} "$@"
exec ae "$@"
exec vi "$@"
echo "Couldn't find an editor!" 1>&2
echo "Set the \$EDITOR environment variable to your desired editor." 1>&2
exit 1