Size table columns to their content, release 1.0.1

Each column of the device list is as wide as its widest cell and the
services get the rest of the line, instead of fixed widths and weights.
When the terminal is too narrow, the widest of name, vendor and services
are shortened first, never below their minimum.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
mikeandClaude Opus 5.5 committed 2026-10-26 16:16:59 +01:00
1 parent 52781ac4a8
commit 60257239d7
7 files changed
+111 -32

No files matched your search

+5 -3
View File
@@ -59,7 +59,7 @@ Download the file for your system from the
| Linux, ARM64 (e.g. Pi) | `nscan-linux-arm64` |
```sh
curl -fLo nscan https://git.micw.org/mike/nscan/releases/download/1.0.0/nscan-darwin-arm64
curl -fLo nscan https://git.micw.org/mike/nscan/releases/download/1.0.1/nscan-darwin-arm64
chmod +x nscan
sudo mv nscan /usr/local/bin/
```
@@ -103,7 +103,9 @@ nscan scan # scan once, print a table, exit
The list updates while a scan runs and rescans every minute. `●` marks devices that are
online, `○` those that are gone (shown in cumulative mode), `⚑` tracked devices and `✓`
whitelisted ones. New devices and tracked devices that come or go appear in the event
line at the bottom and ring the terminal bell.
line at the bottom and ring the terminal bell. Each column is as wide as its content, and
the services get the rest of the line. In a narrow terminal, the widest of name, vendor
and services give way first.
Press <kbd>enter</kbd> for everything nscan knows about a device. That includes all of its
Bonjour services and the open ports from the last port scan.
@@ -280,7 +282,7 @@ named `nscan-<os>-<arch>`, with the version from `version.txt` compiled in. A pl
[mgsh](https://git.micw.org/mike/mgsh), which attaches everything in `./bin`:
```sh
./build.sh && mgsh release 1.0.1
./build.sh && mgsh release @micw $(cat version.txt)
```
See [CHANGELOG.md](CHANGELOG.md) for what changed in each version.