3 Commits

Author SHA1 Message Date
Axodouble 7a1ea39f78 Updated release workflow to drop cache and updated actual go version used for build for optimization
Release / release (push) Successful in 2m55s
2026-05-14 07:02:19 +00:00
Axodouble e8656b09a7 Fixed state being truncated in cell
Release / release (push) Has been cancelled
2026-05-14 06:56:34 +00:00
Axodouble 5c54a1cd91 Updated install script to add shell completions 2026-05-14 06:53:21 +00:00
3 changed files with 28 additions and 6 deletions
+3 -3
View File
@@ -22,9 +22,9 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23'
check-latest: true
cache: true
go-version: '1.24'
check-latest: false
cache: false
- name: Test
run: go test -race ./...
+18
View File
@@ -25,6 +25,24 @@ if [ -w "/usr/local/bin" ]; then
echo_cmd "curl -L -o \"/usr/local/bin/qu\" \"https://git.cer.sh/axodouble/quptime/releases/download/${RELEASE}/qu-${RELEASE}-linux-amd64\""
echo_cmd "chmod +x \"/usr/local/bin/qu\""
echo "> qu has been installed to /usr/local/bin/qu"
# Drop completions into the directories each shell already scans.
# No rc-file edits, and uninstall is just `rm`. Silently skips
# shells whose completion dir is absent.
write_completion() {
local shell=$1 path=$2
[ -d "$(dirname "$path")" ] || return 1
if /usr/local/bin/qu completion "$shell" > "$path" 2>/dev/null; then
echo "> installed $shell completion -> $path"
return 0
fi
rm -f "$path"
return 1
}
write_completion bash /usr/share/bash-completion/completions/qu \
|| write_completion bash /etc/bash_completion.d/qu
write_completion zsh /usr/share/zsh/site-functions/_qu
write_completion fish /usr/share/fish/vendor_completions.d/qu.fish
else
echo "Error: curl is not installed. Please install curl and try again."
exit 1
+7 -3
View File
@@ -58,14 +58,18 @@ var (
stateUnknownStyle = lipgloss.NewStyle().Foreground(colorMuted)
)
// renderState returns a plain-text state label for use inside the
// bubbles table. The table truncates cells with runewidth.Truncate
// which counts the printable bytes of ANSI escape sequences toward
// column width, so a styled value gets chopped down to just "…".
func renderState(s string) string {
switch s {
case "up":
return stateUpStyle.Render("● up")
return "● up"
case "down":
return stateDownStyle.Render("● down")
return "● down"
default:
return stateUnknownStyle.Render("○ unknown")
return "○ unknown"
}
}