Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## unreleased

### Added
* Add :nerdfont as a new supported :bar_format option

## [v0.18.3] - 2024-11-10

### Fixed
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,7 @@ There are number of preconfigured bar formats you can choose from.
| `:diamond` | `♦♦♦♦♦♢♢♢♢♢` | `♢♦♢` |
| `:dot` | `・・・・・・・・・・` | `・・・` |
| `:heart` | `♥♥♥♥♥♡♡♡♡♡` | `♡♥♡` |
| `:nerdfont`| ``| `` |
| `:rectangle` | `▮▮▮▮▮▯▯▯▯▯` | `▯▮▯` |
| `:square` | `▪▪▪▪▪▫▫▫▫▫` | `▫▪▫` |
| `:star` | `★★★★★☆☆☆☆☆` | `☆★☆` |
Expand Down
5 changes: 5 additions & 0 deletions lib/tty/progressbar/formats.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ module Formats
incomplete: "♡",
unknown: "♡♥♡"
},
nerdfont: { # 

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style/AsciiComments: Use only ascii symbols in comments.

complete: "",
incomplete: "",
unknown: ""
},
rectangle: { # ▮▮▮▮▮▯▯▯▯▯
complete: "▮",
incomplete: "▯",
Expand Down
3 changes: 2 additions & 1 deletion spec/unit/new_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@
"unsupported bar format: :unknown. Available formats are: " \
":arrow, :asterisk, :blade, :block, :box, :bracket, " \
":burger, :button, :chevron, :circle, :classic, :crate, :diamond, :dot, " \
":heart, :rectangle, :square, :star, :track, :tread, :triangle, :wave"
":heart, :nerdfont, :rectangle, :square, :star, :track, "\
":tread, :triangle, :wave"
)
end

Expand Down