Files
twislaandClaude Opus 5.5 0fdbb5b1ed
CI / build (pull_request) Successful in 1m38s
Site / build (pull_request) Successful in 9s
Shell: Tab completes every word of a command, and * and ? stand for several files (#67)
Tab used to complete a command's first word only. It now follows the help
text word by word: `lora st` gives `lora status`, `gnss track ` lists
`start  stop`. The words are read from the help text as written, so a new
command completes with no table to keep; the Shell's own words are added in
the same notation.

`*` and `?` in the last part of a path, for ls, du, rm, cp and mv, from the
Shell and both consoles. The command runs once for each name matched, lined
up and run by the main loop as each finishes; `cancel` empties the line-up.
64 matches at most, refused whole past that. In the Shell, rm with a pattern
asks once, with the count.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EhqxQ49eCju4CzKYNjZzwT
2026-10-07 12:47:10 +02:00

5.0 KiB

+++ title = "Shell" description = "The firmware's own commands, typed on the device: look at its state, the SD card, the radio and the network with no PC and no cable." weight = 9 [extra] tag = "Shell" +++

The firmware has a set of commands, made for working on it from a PC. The Shell runs them on the device itself: no computer, no cable, no Wi-Fi. It is the tool for the day something is wrong and you are nowhere near a desk.

It can do real damage: rm deletes, reboot restarts, debug on opens the device to the network. It is the same trust as holding the device, and nothing more.

Using it

Type a command and press Enter. help lists them all; the command reference says what each does. A few to start with:

Command Shows
info The firmware's version, uptime, memory, Wi-Fi, the SD card and both firmware slots
wifi status The network, the address, and where the DNS and time servers came from
ls /notes A folder of the SD card, with sizes and dates
crash The last crash, if there was one
update check Whether a newer release exists
lora status What the radio is set to and what it has heard
  • Tab completes what you are typing: the command, word by word (lora st gives lora status, and gnss track with Tab lists start stop), then a path on the SD card. ls /no and Tab gives ls /notes/; Tab again goes on inside the folder. If several names fit, it completes as far as they agree and lists them. You can type the name in any case, and after a file command you can leave out the first slash: cat no and Tab gives cat /notes/. A name with a space in it isn't completed.
  • Fn with up and down brings back lines you typed before.
  • Alt with up and down scrolls back through what was printed.
  • clear empties the screen, and quit (or Back) leaves.

What you see

The replies to your own commands, and nothing else. The firmware prints a lot besides: IRC connecting, a packet received, whatever a PC on the USB port or the Debug Console is asking for. None of that reaches the Shell. The firmware knows who each line is printed for, so an answer that comes a moment later from another part of it (a folder listing, tasks) is still yours.

Ctrl + b shows everything the firmware prints instead, and all shows in the corner. Press it again to go back.

Opening an App

Type an App's name with a capital letter to open it, without going back to the Launcher:

Irc Wifi Gnss Gemini Lora Storage Notes System Settings

The capital is the difference: every command is in small letters, every App starts with a capital. Tab completes them too.

Deleting

rm works as it does on Unix, with one addition: it asks.

You type What happens
rm /notes/a.txt Asks, then deletes the file
rm -f /notes/a.txt Deletes it without asking
rm /captures/old Refused: it is a folder, and a folder needs -r
rm -r /captures/old Removed at once if it is empty. If not, asks first
rm -rf /captures/old Removed with everything in it, without asking

Several files at once

* stands for any run of characters in a name and ? for exactly one, in ls, du, rm, cp and mv:

You type What happens
ls /notes/*.txt Only the notes ending in .txt
du /captures/lora/*.pcap The size of each capture
cp /gnss/2026-10-0?.gpx /backup Copies the tracks of the 1st to the 9th into /backup, which must exist
rm /screenshots/2026* Asks once, saying how many match, then deletes them
rm -f /screenshots/* Deletes them all without asking

The pattern goes in the last part of the path (/notes/*.txt, not /*/a.txt), and capitals don't matter. A folder that matches is left alone by rm unless you add -r. At most 64 names at a time: past that nothing is done, and you are asked for a narrower pattern. cancel stops what is left.

The folders the firmware keeps its own files in can't be removed, as in the Storage App.

Screenshots

screenshot        the screen, now
screenshot 5      the screen in 5 seconds: time to go to another App

The picture is saved as a PNG in /screenshots on the SD card, named by date and time, and a Toast says so once it is written (so the Toast is never in the picture). From the Shell, "now" is always a picture of the Shell: use the pause to get to the screen you want. The Storage App shows the files; to look at them, take the card to a computer.

What it costs

Nothing while it is closed. Open, about 7 KB of memory, given back when you leave: with IRC connected and a Gemini page open, that can be the difference (see the memory limit).

The keys, as the device lists them

What Fn + h shows on this screen. This table is generated from the firmware's own lists, so it is always the current one.

{{ keys(scopes=["shell"]) }}