aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>2000-03-23 03:51:36 +0000
committerTanaka Akira <akr@users.sourceforge.net>2000-03-23 03:51:36 +0000
commitb41868cf7b7d2d5e7a2d727cc487a3421226f767 (patch)
treec9703031572bd30cc0efec554f8ffcdaef3e2c48
parent14bf99e4eed324b0d2c8563f63b07fc1a3b73d57 (diff)
downloadzsh-b41868cf7b7d2d5e7a2d727cc487a3421226f767.tar.gz
zsh-b41868cf7b7d2d5e7a2d727cc487a3421226f767.tar.xz
zsh-b41868cf7b7d2d5e7a2d727cc487a3421226f767.zip
Initial revision
-rw-r--r--Completion/User/_nedit49
1 files changed, 49 insertions, 0 deletions
diff --git a/Completion/User/_nedit b/Completion/User/_nedit
new file mode 100644
index 000000000..1f030e369
--- /dev/null
+++ b/Completion/User/_nedit
@@ -0,0 +1,49 @@
+#compdef nedit nc
+
+local state line expl nedit_common
+
+nedit_common=( \
+ '-read[open file read only]' \
+ "-create[create file if it doesn't already exist]" \
+ '-line[go to specified line number]:line number' \
+ '-do[execute macro or action commands]' \
+ '-lm[specify language mode]:language mode:->lang' \
+ '-svrname[name the server]:nedit server name' \
+ '(-noiconic)-iconic[set initial window state to iconic]' \
+ '*-xrm:resource:_x_resource' \
+ '*:file:_files' )
+
+if [[ $words[1] = *nc ]]; then
+ _x_arguments -C \
+ '(-noask)-ask[prompt if no server found]' \
+ '(-ask)-noask[start a new server without asking if none found]' \
+ '-svrcmd[command to run server]:server command:_command_names -e' \
+ "$nedit_common[@]"
+else
+ _x_arguments -C \
+ '-server[designate this session as an nedit server]' \
+ '-tags[load ctags file]:tags file:_files' \
+ '-tabs[specify tab width in characters]:tab width' \
+ '(-nowrap -autowrap -noautowrap)-wrap[use continuous wrap mode]' \
+ '(-wrap -autowrap -noautowrap)-nowrap[turn off continuous wrap mode]' \
+ '(-wrap -nowrap -noautowrap)-autowrap[use auto-newline wrap mode]' \
+ '(-wrap -nowrap -autowrap)-noautowrap[turn off auto-newline wrap mode]' \
+ '(-noautoindent)-autoindent[maintain a running indent]' \
+ '(-autoindent)-noautoindent[turn off autoindent]' \
+ '(-noautosave)-autosave[maintain a backup copy of file being edited]' \
+ "(-autosave)-noautosave[don't maintain a backup copy of file being edited]" \
+ "(-iconic)-noiconic[don't set initial window state to iconic]" \
+ '-rows[specify default height in characters for an editing window]:height' \
+ '-columns[specify default width in characters for an editing window]:width' \
+ '-font[specify font for text window]:font:_x_font' \
+ '(-bg)-background:background color:_x_color' \
+ '(-background)-bg[specify background color]:background color:_x_color' \
+ '(-fg)-foreground:foreground color:_x_color' \
+ '(-foreground)-fg[specify foreground color]:foreground color:_x_color' \
+ '-import[load additional preferences file]:nedit preferences file:_files' \
+ "$nedit_common[@]"
+fi
+
+[[ $state = lang ]] && _wanted neditlanguages expl 'language mode' &&
+ compadd "$expl[@]" - ${(f)"$(sed -n \
+ '/^nedit.languageMode/,/^nedit/ s/.* \([^:]*\).*/\1/p' < ~/.nedit)"}