annotate runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim @ 17447:c8bdaff91140

Added tag v8.1.1721 for changeset dcc4120f841294dfadbc2c59e479a669410474b5
author Bram Moolenaar <Bram@vim.org>
date Sat, 20 Jul 2019 19:15:05 +0200
parents d5136647ce31
children 9fe2fed9bb4b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
8775
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
1 " When you're writing shell scripts and you are in doubt which test to use,
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
2 " which shell environment variables are defined, what the syntax of the case
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
3 " statement is, and you need to invoke 'man sh'?
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
4 "
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
5 " Your problems are over now!
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
6 "
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
7 " Attached is a Vim script file for turning gvim into a shell script editor.
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
8 " It may also be used as an example how to use menus in Vim.
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
9 "
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
10 " Written by: Lennart Schultz <les@dmi.min.dk>
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
11
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
12 imenu Stmts.for for in do doneki kk0elli
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
13 imenu Stmts.case case in ) ;; esacbki k0elli
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
14 imenu Stmts.if if then fiki kk0elli
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
15 imenu Stmts.if-else if then else fiki kki kk0elli
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
16 imenu Stmts.elif elif then ki kk0elli
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
17 imenu Stmts.while while do doneki kk0elli
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
18 imenu Stmts.break break
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
19 imenu Stmts.continue continue
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
20 imenu Stmts.function () { }ki k0i
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
21 imenu Stmts.return return
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
22 imenu Stmts.return-true return 0
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
23 imenu Stmts.return-false return 1
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
24 imenu Stmts.exit exit
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
25 imenu Stmts.shift shift
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
26 imenu Stmts.trap trap
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
27 imenu Test.existence [ -e ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
28 imenu Test.existence - file [ -f ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
29 imenu Test.existence - file (not empty) [ -s ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
30 imenu Test.existence - directory [ -d ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
31 imenu Test.existence - executable [ -x ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
32 imenu Test.existence - readable [ -r ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
33 imenu Test.existence - writable [ -w ]hi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
34 imenu Test.String is empty [ x = "x$" ]hhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
35 imenu Test.String is not empty [ x != "x$" ]hhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
36 imenu Test.Strings is equal [ "" = "" ]hhhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
37 imenu Test.Strings is not equal [ "" != "" ]hhhhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
38 imenu Test.Values is greater than [ -gt ]hhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
39 imenu Test.Values is greater equal [ -ge ]hhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
40 imenu Test.Values is equal [ -eq ]hhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
41 imenu Test.Values is not equal [ -ne ]hhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
42 imenu Test.Values is less than [ -lt ]hhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
43 imenu Test.Values is less equal [ -le ]hhhhhhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
44 imenu ParmSub.Substitute word if parm not set ${:-}hhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
45 imenu ParmSub.Set parm to word if not set ${:=}hhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
46 imenu ParmSub.Substitute word if parm set else nothing ${:+}hhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
47 imenu ParmSub.If parm not set print word and exit ${:?}hhi
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
48 imenu SpShVars.Number of positional parameters ${#}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
49 imenu SpShVars.All positional parameters (quoted spaces) ${*}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
50 imenu SpShVars.All positional parameters (unquoted spaces) ${@}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
51 imenu SpShVars.Flags set ${-}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
52 imenu SpShVars.Return code of last command ${?}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
53 imenu SpShVars.Process number of this shell ${$}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
54 imenu SpShVars.Process number of last background command ${!}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
55 imenu Environ.HOME ${HOME}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
56 imenu Environ.PATH ${PATH}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
57 imenu Environ.CDPATH ${CDPATH}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
58 imenu Environ.MAIL ${MAIL}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
59 imenu Environ.MAILCHECK ${MAILCHECK}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
60 imenu Environ.PS1 ${PS1}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
61 imenu Environ.PS2 ${PS2}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
62 imenu Environ.IFS ${IFS}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
63 imenu Environ.SHACCT ${SHACCT}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
64 imenu Environ.SHELL ${SHELL}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
65 imenu Environ.LC_CTYPE ${LC_CTYPE}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
66 imenu Environ.LC_MESSAGES ${LC_MESSAGES}
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
67 imenu Builtins.cd cd
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
68 imenu Builtins.echo echo
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
69 imenu Builtins.eval eval
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
70 imenu Builtins.exec exec
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
71 imenu Builtins.export export
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
72 imenu Builtins.getopts getopts
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
73 imenu Builtins.hash hash
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
74 imenu Builtins.newgrp newgrp
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
75 imenu Builtins.pwd pwd
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
76 imenu Builtins.read read
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
77 imenu Builtins.readonly readonly
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
78 imenu Builtins.return return
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
79 imenu Builtins.times times
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
80 imenu Builtins.type type
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
81 imenu Builtins.umask umask
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
82 imenu Builtins.wait wait
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
83 imenu Set.set set
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
84 imenu Set.unset unset
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
85 imenu Set.mark modified or modified variables set -a
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
86 imenu Set.exit when command returns non-zero exit code set -e
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
87 imenu Set.Disable file name generation set -f
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
88 imenu Set.remember function commands set -h
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
89 imenu Set.All keyword arguments are placed in the environment set -k
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
90 imenu Set.Read commands but do not execute them set -n
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
91 imenu Set.Exit after reading and executing one command set -t
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
92 imenu Set.Treat unset variables as an error when substituting set -u
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
93 imenu Set.Print shell input lines as they are read set -v
d5136647ce31 commit https://github.com/vim/vim/commit/fead3ac9a35e0fc358141d3eb19574cd8a3ecb55
Christian Brabandt <cb@256bit.org>
parents:
diff changeset
94 imenu Set.Print commands and their arguments as they are executed set -x