#	source or include this file
#	it sets the "edit" variable to the selected editor
#	note: EDITOR must not include blanks
#
retry_edit:
set edit = $EDITOR
echo -n "Enter editor to use ($edit): "
set x = $<
set y = ( $x )
if( $#y == 0 ) set x = $edit
if( $#y > 1 ) set x = "ERR"
if( $x != "pico" && $x != "jove" && $x != "emacs" && $x != "vi" ) then
	echo '*** Invalid editor.'
	echo ' '
	goto retry_edit
endif
set edit = $x
unset x y

if( $edit == "pico" && $?embedded ) then
	pico -t $file
else
	$edit $file
endif
