Skip to content

Commit fead3ac

Browse files
committed
patch 7.4.1676
Problem: The shellmenu plugin has to be copied or sourced to be used. Solution: Turn it into a package.
1 parent e101204 commit fead3ac

5 files changed

Lines changed: 102 additions & 96 deletions

File tree

Filelist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,6 +531,7 @@ RT_ALL = \
531531
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
532532
runtime/pack/dist/opt/matchit/doc/matchit.txt \
533533
runtime/pack/dist/opt/matchit/doc/tags \
534+
runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim \
534535
runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
535536

536537
# runtime files for all distributions without CR-NL translation

runtime/macros/README.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,6 @@ how to use Vi and Vim functionality.
1313

1414
less.sh + less.vim make Vim work like less (or more)
1515

16-
shellmenu.vim menus for editing shell scripts in the GUI version
17-
1816

1917
This one is only for Unix.
2018
file_select.vim macros that make a handy file selector
@@ -32,4 +30,6 @@ packadd! justify justifying text.
3230

3331
packadd! matchit makes the % command work better
3432

33+
packadd! shellmenu menus for editing shell scripts in the GUI version
34+
3535
packadd! swapmouse swap left and right mouse buttons

runtime/macros/shellmenu.vim

Lines changed: 3 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,94 +1,3 @@
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'?
4-
"
5-
" Your problems are over now!
6-
"
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.
9-
"
10-
" Written by: Lennart Schultz <[email protected]>
11-
12-
imenu Stmts.for for in dodoneki kk0elli
13-
imenu Stmts.case case in) ;;esacbki k0elli
14-
imenu Stmts.if if thenfiki kk0elli
15-
imenu Stmts.if-else if thenelsefiki kki kk0elli
16-
imenu Stmts.elif elif thenki kk0elli
17-
imenu Stmts.while while dodoneki kk0elli
18-
imenu Stmts.break break
19-
imenu Stmts.continue continue
20-
imenu Stmts.function () {}ki k0i
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 ]hi
28-
imenu Test.existence - file [ -f ]hi
29-
imenu Test.existence - file (not empty) [ -s ]hi
30-
imenu Test.existence - directory [ -d ]hi
31-
imenu Test.existence - executable [ -x ]hi
32-
imenu Test.existence - readable [ -r ]hi
33-
imenu Test.existence - writable [ -w ]hi
34-
imenu Test.String is empty [ x = "x$" ]hhi
35-
imenu Test.String is not empty [ x != "x$" ]hhi
36-
imenu Test.Strings is equal [ "" = "" ]hhhhhhhi
37-
imenu Test.Strings is not equal [ "" != "" ]hhhhhhhhi
38-
imenu Test.Values is greater than [ -gt ]hhhhhhi
39-
imenu Test.Values is greater equal [ -ge ]hhhhhhi
40-
imenu Test.Values is equal [ -eq ]hhhhhhi
41-
imenu Test.Values is not equal [ -ne ]hhhhhhi
42-
imenu Test.Values is less than [ -lt ]hhhhhhi
43-
imenu Test.Values is less equal [ -le ]hhhhhhi
44-
imenu ParmSub.Substitute word if parm not set ${:-}hhi
45-
imenu ParmSub.Set parm to word if not set ${:=}hhi
46-
imenu ParmSub.Substitute word if parm set else nothing ${:+}hhi
47-
imenu ParmSub.If parm not set print word and exit ${:?}hhi
48-
imenu SpShVars.Number of positional parameters ${#}
49-
imenu SpShVars.All positional parameters (quoted spaces) ${*}
50-
imenu SpShVars.All positional parameters (unquoted spaces) ${@}
51-
imenu SpShVars.Flags set ${-}
52-
imenu SpShVars.Return code of last command ${?}
53-
imenu SpShVars.Process number of this shell ${$}
54-
imenu SpShVars.Process number of last background 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 modified or modified variables set -a
86-
imenu Set.exit when command returns non-zero exit code set -e
87-
imenu Set.Disable file name generation set -f
88-
imenu Set.remember function commands set -h
89-
imenu Set.All keyword arguments are placed in the environment set -k
90-
imenu Set.Read commands but do not execute them set -n
91-
imenu Set.Exit after reading and executing one command set -t
92-
imenu Set.Treat unset variables as an error when substituting set -u
93-
imenu Set.Print shell input lines as they are read set -v
94-
imenu Set.Print commands and their arguments as they are executed set -x
1+
" Load the shellmenu package.
2+
" For those users who were loading the shellmenu plugin from here.
3+
packadd shellmenu

runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
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'?
4+
"
5+
" Your problems are over now!
6+
"
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.
9+
"
10+
" Written by: Lennart Schultz <[email protected]>
11+
12+
imenu Stmts.for for in dodoneki kk0elli
13+
imenu Stmts.case case in) ;;esacbki k0elli
14+
imenu Stmts.if if thenfiki kk0elli
15+
imenu Stmts.if-else if thenelsefiki kki kk0elli
16+
imenu Stmts.elif elif thenki kk0elli
17+
imenu Stmts.while while dodoneki kk0elli
18+
imenu Stmts.break break
19+
imenu Stmts.continue continue
20+
imenu Stmts.function () {}ki k0i
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 ]hi
28+
imenu Test.existence - file [ -f ]hi
29+
imenu Test.existence - file (not empty) [ -s ]hi
30+
imenu Test.existence - directory [ -d ]hi
31+
imenu Test.existence - executable [ -x ]hi
32+
imenu Test.existence - readable [ -r ]hi
33+
imenu Test.existence - writable [ -w ]hi
34+
imenu Test.String is empty [ x = "x$" ]hhi
35+
imenu Test.String is not empty [ x != "x$" ]hhi
36+
imenu Test.Strings is equal [ "" = "" ]hhhhhhhi
37+
imenu Test.Strings is not equal [ "" != "" ]hhhhhhhhi
38+
imenu Test.Values is greater than [ -gt ]hhhhhhi
39+
imenu Test.Values is greater equal [ -ge ]hhhhhhi
40+
imenu Test.Values is equal [ -eq ]hhhhhhi
41+
imenu Test.Values is not equal [ -ne ]hhhhhhi
42+
imenu Test.Values is less than [ -lt ]hhhhhhi
43+
imenu Test.Values is less equal [ -le ]hhhhhhi
44+
imenu ParmSub.Substitute word if parm not set ${:-}hhi
45+
imenu ParmSub.Set parm to word if not set ${:=}hhi
46+
imenu ParmSub.Substitute word if parm set else nothing ${:+}hhi
47+
imenu ParmSub.If parm not set print word and exit ${:?}hhi
48+
imenu SpShVars.Number of positional parameters ${#}
49+
imenu SpShVars.All positional parameters (quoted spaces) ${*}
50+
imenu SpShVars.All positional parameters (unquoted spaces) ${@}
51+
imenu SpShVars.Flags set ${-}
52+
imenu SpShVars.Return code of last command ${?}
53+
imenu SpShVars.Process number of this shell ${$}
54+
imenu SpShVars.Process number of last background 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 modified or modified variables set -a
86+
imenu Set.exit when command returns non-zero exit code set -e
87+
imenu Set.Disable file name generation set -f
88+
imenu Set.remember function commands set -h
89+
imenu Set.All keyword arguments are placed in the environment set -k
90+
imenu Set.Read commands but do not execute them set -n
91+
imenu Set.Exit after reading and executing one command set -t
92+
imenu Set.Treat unset variables as an error when substituting set -u
93+
imenu Set.Print shell input lines as they are read set -v
94+
imenu Set.Print commands and their arguments as they are executed set -x

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -748,6 +748,8 @@ static char *(features[]) =
748748

749749
static int included_patches[] =
750750
{ /* Add new patch number below this line */
751+
/**/
752+
1676,
751753
/**/
752754
1675,
753755
/**/

0 commit comments

Comments
 (0)