Skip to content

Commit e909394

Browse files
committed
Print hero name instead of 'Hero' when printing hero cards
1 parent b4e1575 commit e909394

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Print a popular decklist:
3838
```console
3939
$ mcdbcli -l 13922
4040
Wild Tutor - Adam Warlock
41-
Hero cards
41+
Adam Warlock cards
4242
1 × Pip the Troll (Wave #4 The Mad Titan's Shadow #32)
4343
1 × Soul World (Wave #4 The Mad Titan's Shadow #33)
4444
1 × Karmic Staff (Wave #4 The Mad Titan's Shadow #34)
@@ -118,7 +118,7 @@ Wave #3
118118
1 × Deft Focus (Wave #3 Galaxy's Most Wanted #24)
119119
1 × Gamora (Wave #3 Drax #20)
120120
Wave #4
121-
Hero cards
121+
Adam Warlock cards
122122
1 × Pip the Troll (Wave #4 The Mad Titan's Shadow #32)
123123
1 × Soul World (Wave #4 The Mad Titan's Shadow #33)
124124
1 × Karmic Staff (Wave #4 The Mad Titan's Shadow #34)

mcdbcli

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ print_faction_heading() {
116116
printf 'Basic cards'
117117
;;
118118
'hero')
119-
printf 'Hero cards'
119+
local hero_name=$(jq -r '.investigator_name' <<<"$DECK_JSON")
120+
printf '%s cards' "$hero_name"
120121
;;
121122
esac
122123

0 commit comments

Comments
 (0)