fix: update bbansi version to stop swallowing characters

This commit is contained in:
Daylin Morgan 2024-03-19 12:44:25 -05:00
parent f9ea275eb0
commit e3f24f710a
Signed by: daylin
GPG key ID: 950D13E9719334AD
5 changed files with 34 additions and 30 deletions

View file

@ -14,6 +14,9 @@ task release, "build release assets":
version = (gorgeEx "git describe --tags --always --match 'v*'").output
exec &"forge release -v {version} -V"
task updateNixLock, "regenerate nix/lock.json":
exec "nix run github:daylinmorgan/nnl nimble.lock > nix/lock.json"
task bundle, "package build assets":
withDir "dist":
for dir in listDirs("."):

View file

@ -1,6 +1,26 @@
{
"version": 2,
"packages": {
"bbansi": {
"version": "0.1.1",
"vcsRevision": "9a85d9ed028f06f1ed1ee6851480a51408a6004e",
"url": "https://github.com/daylinmorgan/bbansi",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "b338433f9a7a1b788b7583674c2b14096ced29ee"
}
},
"usu": {
"version": "0.1.0",
"vcsRevision": "25574d165bb7f60900b36590bc49f3d90e47cea4",
"url": "https://github.com/usu-dev/usu-nim",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "61a8c13946e3eea9dbe04a6141ed93811563026c"
}
},
"cligen": {
"version": "1.7.0",
"vcsRevision": "4193f802796f15559c81c6dd56724d6f20345917",
@ -20,26 +40,6 @@
"checksums": {
"sha1": "7109f26fc632ceed85e0c48afe55051948c1bc61"
}
},
"bbansi": {
"version": "0.1.0",
"vcsRevision": "e77ad85cd3a68cabd6ef66727fa1a0cd14c4d0d3",
"url": "https://github.com/daylinmorgan/bbansi",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "f47cade0fa02ef944d76e31199762b26389bb9a9"
}
},
"usu": {
"version": "0.1.0",
"vcsRevision": "25574d165bb7f60900b36590bc49f3d90e47cea4",
"url": "https://github.com/usu-dev/usu-nim",
"downloadMethod": "git",
"dependencies": [],
"checksums": {
"sha1": "61a8c13946e3eea9dbe04a6141ed93811563026c"
}
}
},
"tasks": {}

View file

@ -38,11 +38,11 @@
},
{
"method": "fetchzip",
"path": "/nix/store/m086yq0f29cg98w3b12d70cw7xki1j39-source",
"rev": "e77ad85cd3a68cabd6ef66727fa1a0cd14c4d0d3",
"sha256": "1l5a5kwviq76kxzagljzpwzc3p43qz7wzs5zvrqi5c59klw1967c",
"path": "/nix/store/ws9bc49njd13lzlankiw9vz85h56n0sn-source",
"rev": "9a85d9ed028f06f1ed1ee6851480a51408a6004e",
"sha256": "04r9wincqd4a5hmxixbsw0zjpvlrpckny4jkzahvbnh8s5f1xlc6",
"srcDir": "src",
"url": "https://github.com/daylinmorgan/bbansi/archive/e77ad85cd3a68cabd6ef66727fa1a0cd14c4d0d3.tar.gz",
"url": "https://github.com/daylinmorgan/bbansi/archive/9a85d9ed028f06f1ed1ee6851480a51408a6004e.tar.gz",
"subDir": "",
"packages": [
"bbansi"

View file

@ -128,9 +128,9 @@ proc clip(s: string): string =
else: s
proc highlight(p: Project): string =
if p.named: "red"
elif p.location == "": "green"
if p.location == "": "green"
elif p.open: "yellow"
elif p.named: "bold cyan"
else: "default"
proc addProject(b: var Buffer, project: Project, selected: bool) =
@ -140,10 +140,11 @@ proc addProject(b: var Buffer, project: Project, selected: bool) =
cur = (if selected: "> " else: " ")
if project.matched:
var displayName = $input.bb("red")
var displayName = fmt"[red]{input}[/]"
if input.len < name.len:
displayName.add $name[input.len..^1].bb(project.highlight)
b.addLine(cur & $displayName)
# bbansi missing add(string, bbstring) interface
displayName = displayName & fmt"[{project.highlight}]{name[input.len..^1]}[/{project.highlight}]"
b.addLine(cur & $displayName.bb)
else:
b.addLine(cur & $name.bb(project.highlight))

View file

@ -15,6 +15,6 @@ requires "nim >= 2.0.0"
requires "https://github.com/inv2004/illwill/#449ae5d2f05aba125d5a71823ff1da55b1766d70"
# requires "illwill == 0.3.2",
requires "cligen"
requires "https://github.com/daylinmorgan/bbansi >= 0.1.0"
requires "https://github.com/daylinmorgan/bbansi >= 0.1.1"
requires "https://github.com/usu-dev/usu-nim"