@@ -54,11 +54,13 @@ function prepareDebPackage(arch) {
5454 const icon = gulp . src ( 'resources/linux/code.png' , { base : '.' } )
5555 . pipe ( rename ( 'usr/share/pixmaps/' + product . linuxIconName + '.png' ) ) ;
5656
57- // const bash_completion = gulp.src('resources/completions/bash/code')
58- // .pipe(rename('usr/share/bash-completion/completions/code'));
57+ const bash_completion = gulp . src ( 'resources/completions/bash/code' )
58+ . pipe ( replace ( '@@APPNAME@@' , product . applicationName ) )
59+ . pipe ( rename ( 'usr/share/bash-completion/completions/' + product . applicationName ) ) ;
5960
60- // const zsh_completion = gulp.src('resources/completions/zsh/_code')
61- // .pipe(rename('usr/share/zsh/vendor-completions/_code'));
61+ const zsh_completion = gulp . src ( 'resources/completions/zsh/_code' )
62+ . pipe ( replace ( '@@APPNAME@@' , product . applicationName ) )
63+ . pipe ( rename ( 'usr/share/zsh/vendor-completions/_' + product . applicationName ) ) ;
6264
6365 const code = gulp . src ( binaryDir + '/**/*' , { base : binaryDir } )
6466 . pipe ( rename ( function ( p ) { p . dirname = 'usr/share/' + product . applicationName + '/' + p . dirname ; } ) ) ;
@@ -94,7 +96,7 @@ function prepareDebPackage(arch) {
9496 . pipe ( replace ( '@@UPDATEURL@@' , product . updateUrl || '@@UPDATEURL@@' ) )
9597 . pipe ( rename ( 'DEBIAN/postinst' ) ) ;
9698
97- const all = es . merge ( control , postinst , postrm , prerm , desktops , appdata , icon , /* bash_completion, zsh_completion, */ code ) ;
99+ const all = es . merge ( control , postinst , postrm , prerm , desktops , appdata , icon , bash_completion , zsh_completion , code ) ;
98100
99101 return all . pipe ( vfs . dest ( destination ) ) ;
100102 } ;
@@ -144,11 +146,13 @@ function prepareRpmPackage(arch) {
144146 const icon = gulp . src ( 'resources/linux/code.png' , { base : '.' } )
145147 . pipe ( rename ( 'BUILD/usr/share/pixmaps/' + product . linuxIconName + '.png' ) ) ;
146148
147- // const bash_completion = gulp.src('resources/completions/bash/code')
148- // .pipe(rename('BUILD/usr/share/bash-completion/completions/code'));
149+ const bash_completion = gulp . src ( 'resources/completions/bash/code' )
150+ . pipe ( replace ( '@@APPNAME@@' , product . applicationName ) )
151+ . pipe ( rename ( 'BUILD/usr/share/bash-completion/completions/' + product . applicationName ) ) ;
149152
150- // const zsh_completion = gulp.src('resources/completions/zsh/_code')
151- // .pipe(rename('BUILD/usr/share/zsh/site-functions/_code'));
153+ const zsh_completion = gulp . src ( 'resources/completions/zsh/_code' )
154+ . pipe ( replace ( '@@APPNAME@@' , product . applicationName ) )
155+ . pipe ( rename ( 'BUILD/usr/share/zsh/site-functions/_' + product . applicationName ) ) ;
152156
153157 const code = gulp . src ( binaryDir + '/**/*' , { base : binaryDir } )
154158 . pipe ( rename ( function ( p ) { p . dirname = 'BUILD/usr/share/' + product . applicationName + '/' + p . dirname ; } ) ) ;
@@ -171,7 +175,7 @@ function prepareRpmPackage(arch) {
171175 const specIcon = gulp . src ( 'resources/linux/rpm/code.xpm' , { base : '.' } )
172176 . pipe ( rename ( 'SOURCES/' + product . applicationName + '.xpm' ) ) ;
173177
174- const all = es . merge ( code , desktops , appdata , icon , /* bash_completion, zsh_completion, */ spec , specIcon ) ;
178+ const all = es . merge ( code , desktops , appdata , icon , bash_completion , zsh_completion , spec , specIcon ) ;
175179
176180 return all . pipe ( vfs . dest ( getRpmBuildPath ( rpmArch ) ) ) ;
177181 } ;
0 commit comments