SevenTTY — local shell + terminal + SSH for classic Mac OS

I finally fixed the FTP bug, and so i felt good about cutting another release. I also added in > / >> redirection for various commands too! Wget with auto-file-typing and TLS1.2 support (TLS did add some size to the binary, but memory usage still decent due to other optimizations). Also a proper scrollbar, lots of other goodies.

SevenTTY v1.2.0

The biggest release yet — SCP and FTP file transfer, 34 new shell commands, flicker-free rendering, output redirection, and major memory and performance improvements.

New Features​

  • SCP file transfer — download and upload files over SSH with scp command. Supports password and key auth, glob patterns for batch upload (scp *.txt user@host:~), transfer progress display
  • FTP client — full FTP client with ftp get/put/ls subcommands and wget ftp:// integration. PASV mode, progress bar, glob uploads, password prompt
  • Output redirection — shell commands and nc now support > file (truncate) and >> file (append) to redirect output to local files
  • 34 new shell commands:
    • Checksums: md5sum, sha1sum, sha256sum, sha512sum, crc32
    • Text processing: grep (-ivnc), head, tail, wc (-lwc), nl, cut (-d -f), fold (-w), rev, rot13, strings (-n)
    • File utilities: hexdump, xxd (-r), cmp, ln -s (creates real Mac aliases), readlink, realpath, which, basename, dirname
    • Line ending converters: dos2unix, unix2dos, mac2unix, unix2mac
    • System: uptime, cal, hostname, history, sleep, seq
  • fixtype command — auto-set Mac type/creator codes from file extension, with glob and multi-file support
  • Vertical scrollbar — proper Mac scrollbar control with arrow, page, and thumb tracking
  • Finder alias resolution — local shell commands transparently resolve Finder aliases (cd, cat, open, ls, cp, head, tail, etc.), including in glob expansion and tab completion

Improvements​

  • GWorld offscreen row buffer — terminal rows are composed offscreen and blitted atomically via CopyBits, eliminating erase-then-draw flicker
  • Dirty row tracking — only changed rows are redrawn (10-24x fewer cells drawn for cursor blink, single-char echo, etc.)
  • GWorld depth matching — uses screen depth instead of fixed 32-bit, avoiding expensive depth conversion on 8-bit displays
  • Memory diet — scrollback and shell history moved from embedded arrays to heap-allocated pointers (saves ~320KB from globals). Thread stacks reduced. Partition size reverted to 2MB, runs on 4MB Macs
  • Mac Roman to UTF-8 conversion — local shell output correctly converts Mac Roman high bytes to UTF-8 for proper glyph rendering in vterm
  • ANSI.SYS compatibility — translates ESC[s/u (cursor save/restore) to DEC VT sequences for correct BBS ANSI art display
  • wget threaded worker — downloads run in a cooperative thread (no more UI freeze). Inline progress, download speed on completion, -n flag to suppress progress
  • wget improvements — TLS handshake timeout, redirect handling (scheme-relative, absolute, bare relative), content-length validation
  • rm glob support — rm *.bin with -i interactive confirm
  • Scroll shortcuts — Cmd+Up/Down scrolls one line, Shift+PageUp/Down scrolls half page
  • Paginated help — help output now shows --more-- prompt
  • cal improvements — full year view (cal 2026) with 3 months per row, today highlighted in reverse video

Bug Fixes​

  • FTP multiline response fix — FTP connections no longer hang on servers that send multiline 230 responses (e.g., ftp.gnu.org). Root cause: null-termination of parsed line corrupted the first byte of the next buffered line
  • FTP connection refused handling — properly handle kOTLookErr/T_DISCONNECT
  • OT send deadlock fix — kOTFlowErr now yields instead of falling through as fatal. Fixes busy-loop deadlock during sustained writes (SCP upload)
  • SCP upload stall fix — broken int64 formatting on 68K fixed with manual uint64-to-decimal in libssh2 fork
  • SCP path fixes — filenames with spaces, ~ as remote directory, basename from Mac colon paths, buffer overflow guard
  • Symbol font fixes — font family ID moved to 29183 to avoid conflicts with system fonts. Resources pinned with HNoPurge, Font Manager cache primed at startup
  • DrawGrowIcon clipped — prevents horizontal line from cutting across terminal content
  • Memory leak fix — scp_auth_prompt prefs restoration
 
I wonder how many commands it has now compared to Busybox or Toybox
Those are the direct inspiration for this, definitely a lot of them now. It also takes the "One binary that does it all" approach. That's about all they have in common though, as it's not sharing any code with those projects, and it's not actually trying to create the required unix subsystem that those would need (that's more the macrelix approach, actually.) This is meant to be more of a mac-native equivalency shell, as if classic mac just had a shell of it's own, and the various command-equivalents are the shell "built-ins."

I think the main ones i skipped are things that wouldn't make sense until I add some notion of piping, like sort/uniq. The "one-binary" approach means I was able to build a lot of this functionality without said unix subsystem, but that also means things like native pipes just aren't a thing. Though, after getting the "> / >>" redirection working, I've got some ideas on how a pipe-equivalent might work. It's definitely on my mind.

Few other things I've been thinking of doing, like a proper interactive shell for FTP/SFTP. SCP is now supported though, which covers a lot.
 
Back
Top