Skip to content

Commit

Permalink
Version 2.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed May 22, 2024
1 parent 551524d commit 481d298
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 21 deletions.
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
### unreleased
### v2.7.0 (2024-05-22)

- Improve `-format` flag:

- Add `%name` as an alias for `%(name l:auto)`; this is a lot less typing and
requires less shell quoting, and >90% of the time this is what you want.

- Automatically prepend character, codepoint, and name if it starts with a
`+`; for example:
- Automatically prepend character, codepoint, and name if the format flag
starts with `+`; for example:

% uni identify -f +'%unicode %plane' a
Name Unicode Plane
Expand Down Expand Up @@ -39,9 +39,9 @@
'ℱ' U+2131 8497 e2 84 b1 ℱ SCRIPT CAPITAL F [Fourier transform]
'Ⅎ' U+2132 8498 e2 84 b2 Ⅎ TURNED CAPITAL F [Claudian digamma inversum]

- Allow arguments to `print` end with a comma. This comes up when copy/pasting
some list of codepoints from another source; there's no real reason to error
out on this.
- Allow arguments to `print`to start or end with a comma or slash. This comes up
when copy/pasting some list of codepoints from another source; there's no real
reason to error out on this.

- Allow listing unicode versions with `uni list unicode` and planes with `uni
list planes`.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.21
require (
zgo.at/runewidth v0.1.0
zgo.at/termtext v1.5.0
zgo.at/zli v0.0.0-20240521052840-819d150b8974
zgo.at/zli v0.0.0-20240522161040-91dbcffb2960
zgo.at/zstd v0.0.0-20240521013615-10baa641d7d0
)

Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ zgo.at/runewidth v0.1.0 h1:ED4PzJpYJlZMDEkoz+iPKjb5NrwbKnWPXDMJlNlfk9g=
zgo.at/runewidth v0.1.0/go.mod h1:Ugl6FGPF5Ib/NRu2UAV2wVthEgYfEz51Bu/uyNbWZSw=
zgo.at/termtext v1.5.0 h1:4p9GVUDYUR8oWvpxOZsO5ZrNSkA99bp8gXNKxKj+Kl0=
zgo.at/termtext v1.5.0/go.mod h1:AcdAAiydkqSFadljJaEj9jv7bpyJxfQqGtPWyZCLenQ=
zgo.at/zli v0.0.0-20240521052840-819d150b8974 h1:YDS8AQffen7PNH8wlpEvqimOIfuYaPZP9UM6E0hkb1k=
zgo.at/zli v0.0.0-20240521052840-819d150b8974/go.mod h1:qhnApe1+0zc1rz3S9lbauLTBZstPJMCw9jlH9ly28q8=
zgo.at/zli v0.0.0-20240522161040-91dbcffb2960 h1:EKRLwSV84fLidsIOk4aEe2jrXQJyAsvHZ+jQN19EhXw=
zgo.at/zli v0.0.0-20240522161040-91dbcffb2960/go.mod h1:qhnApe1+0zc1rz3S9lbauLTBZstPJMCw9jlH9ly28q8=
zgo.at/zstd v0.0.0-20240521013615-10baa641d7d0 h1:s4v5EAzMGV4ly1t240XidEY1Cq0OuyZSZL57Kbz/Big=
zgo.at/zstd v0.0.0-20240521013615-10baa641d7d0/go.mod h1:o/Q8+EtSahHnfkbB3t8wXE0FnoDTmJ0sBDlzezv9XeM=
27 changes: 15 additions & 12 deletions uni.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,23 +288,26 @@ const (
func main() {
flag := zli.NewFlags(os.Args)
var (
compact = flag.Bool(false, "c", "compact", "q", "quiet")
help = flag.Bool(false, "h", "help")
rawF = flag.Bool(false, "r", "raw")
pager = flag.Bool(false, "p", "pager")
or = flag.Bool(false, "o", "or")
formatF = flag.String(defaultFormat, "format", "f")
tone = flag.String("", "t", "tone", "tones")
gender = flag.String("person", "g", "gender", "genders")
asF = flag.String("list", "a", "as")
jsonF = flag.Bool(false, "json", "j")
compact = flag.Bool(false, "c", "compact", "q", "quiet")
help = flag.Bool(false, "h", "help")
versionF = flag.Bool(false, "v", "version")
rawF = flag.Bool(false, "r", "raw")
pager = flag.Bool(false, "p", "pager")
or = flag.Bool(false, "o", "or")
formatF = flag.String(defaultFormat, "format", "f")
tone = flag.String("", "t", "tone", "tones")
gender = flag.String("person", "g", "gender", "genders")
asF = flag.String("list", "a", "as")
jsonF = flag.Bool(false, "json", "j")
)
zli.F(flag.Parse())

if versionF.Set() {
fmt.Println(version)
return
}
if pager.Set() {
defer zli.PagerStdout()()
}

if help.Set() {
fmt.Fprint(zli.Stdout, usage)
return
Expand Down

0 comments on commit 481d298

Please sign in to comment.