Skip to content

Commit ebefecd

Browse files
committed
update additional .sh writers to consider partials_extension
1 parent 9a1ea36 commit ebefecd

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

lib/bashly/commands/add.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ class Add < Base
3434
command 'comp', 'Generate a bash completions script or function.'
3535
command 'config', 'Add standard functions for handling INI files to the lib directory.'
3636
command 'help', 'Add a help command, in addition to the standard --help flag.'
37-
command 'lib', 'Create the additional lib directory for additional user scripts. All *.sh scripts in this ' \
38-
'folder will be included in the final bash script.'
37+
command 'lib', <<~USAGE
38+
Create the lib directory for any additional user scripts.
39+
All *.sh scripts in this directory will be included in the final bash script.
40+
Note that if you configured a differetc partials_extension, then the extensions of the files in this directory need to match.
41+
USAGE
3942

4043
command 'settings', 'Copy a sample settings.yml file to your project, allowing you to customize some ' \
4144
'bashly options.'

lib/bashly/libraries/help.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ class Help < Base
66
def files
77
[
88
{
9-
path: "#{Settings.source_dir}/help_command.sh",
9+
path: "#{Settings.source_dir}/help_command.#{Settings.partials_extension}",
1010
content: help_command,
1111
},
1212
]

lib/bashly/script/wrapper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def body
4949
end
5050

5151
def custom_header_path
52-
@custom_header_path ||= "#{Settings.source_dir}/header.sh"
52+
@custom_header_path ||= "#{Settings.source_dir}/header.#{Settings.partials_extension}"
5353
end
5454
end
5555
end

0 commit comments

Comments
 (0)