Skip to content

Commit

Permalink
Merge pull request #47 from markstos/patch-4
Browse files Browse the repository at this point in the history
BugFix for case when subcommand contains command name
  • Loading branch information
qrush committed Aug 23, 2021
2 parents b086c1b + 06ca895 commit ca98688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libexec/sub-commands
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ shopt -s nullglob

{ for path in ${PATH//:/$'\n'}; do
for command in "${path}/sub-"*; do
command="${command##*sub-}"
command="${command##${path}/sub-}"
if [ -n "$sh" ]; then
if [ ${command:0:3} = "sh-" ]; then
echo ${command##sh-}
Expand Down

0 comments on commit ca98688

Please sign in to comment.