File: sensible-editor

package info (click to toggle)
debianutils 1.13.3
  • links: PTS
  • area: main
  • in suites: potato
  • size: 148 kB
  • ctags: 35
  • sloc: ansic: 588; sh: 312; 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