Skip to content

Commit 8a301d3

Browse files
committed
improve handling of alt aliases
1 parent 3f5b311 commit 8a301d3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/bashly/script/command.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def action_name
2727

2828
# Returns all the possible aliases for this command
2929
def aliases
30-
alt ? [name] + alt : [name]
30+
[name] + alt
3131
end
3232

3333
# Returns an array of alternative aliases if any

lib/bashly/views/command/usage.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
echo
1616
fi
1717

18-
<%- if alt.any? -%>
18+
<%- if alt&.any? -%>
1919
printf "<%= strings[:command_alias] % { alias: alt.join(', ') } %>\n"
2020
echo
2121
<%- end -%>

0 commit comments

Comments
 (0)