Skip to content

Commit b8fefd5

Browse files
committed
feat: Allow passing in '-' when doing do-init.sh
This backwards compatibility feature doesn't cost anything, it shouldn't have been removed in the first place. Not to mention, this specific argument interface for initialization in general for command line tools
1 parent 0f60378 commit b8fefd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/lib/commands/do-init.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ echo_posix_shell_variables() {
2222
# - Sourcing bpm completion
2323
# - Sourcing 'include' function
2424
do-init() {
25+
if [ "$1" == '-' ]; then
26+
shift
27+
fi
28+
2529
local shell="$1"
2630

2731
if [ -z "$shell" ]; then

0 commit comments

Comments
 (0)