# Start the NEdit editor: # Run the script .ned in the current directory if it exists; nc otherwise ACTION ned { TYPE COMMAND # LABEL Run NEdit (server mode) WINDOW_TYPE NO_STDIO ICON nedit LABEL Run NEdit in server mode EXEC_STRING sh -c \ 'if [ -d "$1" ]; then \ : a directory was sent to the action - go there ; \ cd "$1"; shift; \ fi; \ \ : find suitable .ned script; \ if [ -f .ned ] && [ -x .ned ]; then \ cmd="exec .ned"; \ elif [ -f $HOME/.ned ] && [ -x $HOME/.ned ]; then \ cmd="exec $HOME/.ned"; \ else \ : no .ned script - just use plain nc; \ cmd="nc -noask"; \ fi; \ \ : invoke the command chosen; \ if [ x"$1" = x"`pwd`/.ned" ]; then \ shift; $cmd "$@"; \ elif [ x"$1" = x"`pwd`" ]; then \ shift; $cmd "$@"; \ else \ $cmd "$@"; \ fi' - %Args% DESCRIPTION Runs an unnamed NEdit server (or execute .ned in pwd) } DATA_ATTRIBUTES NEditRunFile { ICON nedit ACTIONS NEdit,Run DESCRIPTION This file is run automatically as part of the ned \ action: it is intended to start a new NEdit server \ or connect to an existing one. } DATA_CRITERIA NEditRunFile1 { DATA_ATTRIBUTES_NAME NEditRunFile PATH_PATTERN */.ned MODE !d&x } ACTION Run { LABEL Run NEdit (server mode) ARG_TYPE NEditRunFile TYPE MAP MAP_ACTION ned }