Merge branch 'vim-with-runtime' into feat/quickfix-title
[vim_extended.git] / runtime / macros / shellmenu.vim
blob6175d1d9a64e11c1004d25b144cf89987806ae6b
1 " When you're writing shell scripts and you are in doubt which test to use,
2 " which shell environment variables are defined, what the syntax of the case
3 " statement is, and you need to invoke 'man sh'?
5 " Your problems are over now!
7 " Attached is a Vim script file for turning gvim into a shell script editor.
8 " It may also be used as an example how to use menus in Vim.
10 " Written by: Lennart Schultz <les@dmi.min.dk>
12 imenu Stmts.for for  in \rdo\r\rdone\eki    \ekk0elli
13 imenu Stmts.case        case  in\r) ;;\resac\ebki  \ek0elli
14 imenu Stmts.if  if   \rthen\r\rfi\eki       \ekk0elli
15 imenu Stmts.if-else     if   \rthen\r\relse\r\rfi\eki \ekki    \ekk0elli
16 imenu Stmts.elif        elif   \rthen\r\r\eki       \ekk0elli
17 imenu Stmts.while       while   \rdo\r\rdone\eki    \ekk0elli
18 imenu Stmts.break       break 
19 imenu Stmts.continue    continue 
20 imenu Stmts.function    () {\r\r}\eki      \ek0i
21 imenu Stmts.return      return 
22 imenu Stmts.return-true return 0
23 imenu Stmts.return-false        return 1
24 imenu Stmts.exit        exit 
25 imenu Stmts.shift       shift 
26 imenu Stmts.trap        trap 
27 imenu Test.existence    [ -e  ]\ehi
28 imenu Test.existence\x16 -\x16 file           [ -f  ]\ehi
29 imenu Test.existence\x16 -\x16 file\x16 (not\x16 empty)     [ -s  ]\ehi
30 imenu Test.existence\x16 -\x16 directory      [ -d  ]\ehi
31 imenu Test.existence\x16 -\x16 executable     [ -x  ]\ehi
32 imenu Test.existence\x16 -\x16 readable       [ -r  ]\ehi
33 imenu Test.existence\x16 -\x16 writable       [ -w  ]\ehi
34 imenu Test.String\x16 is\x16 empty [ x = "x$" ]\ehhi
35 imenu Test.String\x16 is\x16 not\x16 empty [ x != "x$" ]\ehhi
36 imenu Test.Strings\x16 is\x16 equal [ "" = "" ]\ehhhhhhhi
37 imenu Test.Strings\x16 is\x16 not\x16 equal [ "" != "" ]\ehhhhhhhhi
38 imenu Test.Values\x16 is\x16 greater\x16 than [  -gt  ]\ehhhhhhi
39 imenu Test.Values\x16 is\x16 greater\x16 equal [  -ge  ]\ehhhhhhi
40 imenu Test.Values\x16 is\x16 equal [  -eq  ]\ehhhhhhi
41 imenu Test.Values\x16 is\x16 not\x16 equal [  -ne  ]\ehhhhhhi
42 imenu Test.Values\x16 is\x16 less\x16 than [  -lt  ]\ehhhhhhi
43 imenu Test.Values\x16 is\x16 less\x16 equal [  -le  ]\ehhhhhhi
44 imenu ParmSub.Substitute\x16 word\x16 if\x16 parm\x16 not\x16 set ${:-}\ehhi
45 imenu ParmSub.Set\x16 parm\x16 to\x16 word\x16 if\x16 not\x16 set ${:=}\ehhi
46 imenu ParmSub.Substitute\x16 word\x16 if\x16 parm\x16 set\x16 else\x16 nothing ${:+}\ehhi
47 imenu ParmSub.If\x16 parm\x16 not\x16 set\x16 print\x16 word\x16 and\x16 exit ${:?}\ehhi
48 imenu SpShVars.Number\x16 of\x16 positional\x16 parameters ${#}
49 imenu SpShVars.All\x16 positional\x16 parameters\x16 (quoted\x16 spaces) ${*}
50 imenu SpShVars.All\x16 positional\x16 parameters\x16 (unquoted\x16 spaces) ${@}
51 imenu SpShVars.Flags\x16 set ${-}
52 imenu SpShVars.Return\x16 code\x16 of\x16 last\x16 command ${?}
53 imenu SpShVars.Process\x16 number\x16 of\x16 this\x16 shell ${$}
54 imenu SpShVars.Process\x16 number\x16 of\x16 last\x16 background\x16 command ${!}
55 imenu Environ.HOME ${HOME}
56 imenu Environ.PATH ${PATH}
57 imenu Environ.CDPATH ${CDPATH}
58 imenu Environ.MAIL ${MAIL}
59 imenu Environ.MAILCHECK ${MAILCHECK}
60 imenu Environ.PS1 ${PS1}
61 imenu Environ.PS2 ${PS2}
62 imenu Environ.IFS ${IFS}
63 imenu Environ.SHACCT ${SHACCT}
64 imenu Environ.SHELL ${SHELL}
65 imenu Environ.LC_CTYPE ${LC_CTYPE}
66 imenu Environ.LC_MESSAGES ${LC_MESSAGES}
67 imenu Builtins.cd cd
68 imenu Builtins.echo echo
69 imenu Builtins.eval eval
70 imenu Builtins.exec exec
71 imenu Builtins.export export
72 imenu Builtins.getopts getopts
73 imenu Builtins.hash hash
74 imenu Builtins.newgrp newgrp
75 imenu Builtins.pwd pwd
76 imenu Builtins.read read
77 imenu Builtins.readonly readonly
78 imenu Builtins.return return
79 imenu Builtins.times times
80 imenu Builtins.type type
81 imenu Builtins.umask umask
82 imenu Builtins.wait wait
83 imenu Set.set set
84 imenu Set.unset unset
85 imenu Set.mark\x16 modified\x16 or\x16 modified\x16 variables set -a
86 imenu Set.exit\x16 when\x16 command\x16 returns\x16 non-zero\x16 exit\x16 code set -e
87 imenu Set.Disable\x16 file\x16 name\x16 generation set -f
88 imenu Set.remember\x16 function\x16 commands set -h
89 imenu Set.All\x16 keyword\x16 arguments\x16 are\x16 placed\x16 in\x16 the\x16 environment set -k
90 imenu Set.Read\x16 commands\x16 but\x16 do\x16 not\x16 execute\x16 them set -n
91 imenu Set.Exit\x16 after\x16 reading\x16 and\x16 executing\x16 one\x16 command set -t
92 imenu Set.Treat\x16 unset\x16 variables\x16 as\x16 an\x16 error\x16 when\x16 substituting set -u
93 imenu Set.Print\x16 shell\x16 input\x16 lines\x16 as\x16 they\x16 are\x16 read set -v
94 imenu Set.Print\x16 commands\x16 and\x16 their\x16 arguments\x16 as\x16 they\x16 are\x16 executed set -x