zy v1.0.42
Official binary release for zy 1.0.42.
What's changed in 1.0.42
Added
explorecan grep the whole tree into a navigable pane (pressL). Type a
pattern and instead of a throwaway popup you get a results pane: every hit grouped
under its file, each line shown with itsline:col(right-aligned so the snippets
line up) and a snippet, that you scroll like a directory (j/k/g/G). Press
Enter on a hit to open it at that line in$EDITOR, Space to mark hits,Yto
copy their paths, andHto export the whole result set as a self-contained
offline HTML report (hits grouped by file, syntax-highlighted, with a file-tree
sidebar and click-to-editor line links);Escreturns to the file list. You can
scope the search with
leading chips, e.g.ext:c path:src !path:vendor TODOgrepsTODOonly in.c
files undersrcand outsidevendor. File operations (delete, rename, move,
chmod) are disabled in the grep pane on purpose, since a hit is a line in a file
rather than a thing to delete, so a stray keystroke can't touch your files.explorehas a regex bulk-rename with a live preview (pressCtrl-R). Type a
s/pat/repl/flagsexpression and watch a before/after list of every selected file
update as you type; Enter applies it. It's real PCRE2, so you get$1backrefs,
\U/\Lcase changes,/gand/iflags, and a{n}1-based counter for
numbering. Renames happen in place through the same collision-safe two-pass staging
the editor bulk-rename uses, and the modal refuses to apply if two files would land
on the same name.explorekeys are remappable now. Add an[explore.keys]table to
~/.zy/config.tomlmapping an action to a key, e.g.info = "Z"or
compress_zip = "ctrl-z", and that key triggers the action while the default
still works. About 30 actions are bindable (the full list is in the action
registry); press?in explore for the syntax. Single-character andctrl-x
style keys are supported.explorepreviews PDFs as images now (and PostScript / video where the tools
are installed). Move the cursor onto a.pdfand the preview pane shows the
first page rendered as a picture instead of a wall of extracted text; PostScript
and.epsgo through ghostscript and videos through ffmpeg, each rendered to a
thumbnail and cached so a parked cursor doesn't re-run the tool. If the tool
isn't installed it quietly falls back to the old text preview.explore's sidebar now lists your mounted disks. A DISKS section shows each
real mounted filesystem (skipping snap/loop images) with a usage-percent chip
coloured green/amber/red by how full it is; Enter jumps to the mount. The sidebar
also scrolls now, so a long list of bookmarks, pinned folders, disks, and recents
stays reachable instead of clipping at the bottom.explorecan show detail columns: press,to cycle name-only → size →
+age → +permissions. The columns are right-aligned next to each row and
auto-drop when a pane gets too narrow to keep the filename readable, so the
list never looks cramped.explorecan create archives now:czips the selection,Cmakes a
.tar.zst. It compresses the marked files (or the focused one) into a new
archive in the current directory, named after the focused entry and never
overwriting an existing file. Directories are included recursively, with
permissions and symlinks preserved. (Needs a build with libarchive, same as the
existing extract; without it the keys are a no-op.)explorehas a rich file-info card now (pressI). It shows owner and
group, permissions (rwx + octal), size (computed recursively for a directory,
with the item count), modified/accessed/changed times, inode and link count, a
symlink's target, the binary format and architecture for executables (ELF /
PE / Mach-O, e.g. "ELF 64-bit x86-64"), the Linux inode attributes (lsattr),
and a SHA-256 for files up to 64 MiB. Read-only;j/kscroll a tall card and
any other key closes it.explorelisting got three upgrades: natural sort, a fuzzy filter, and a
sort picker. Files now sort in natural order, soimg2.pngcomes before
img10.pnginstead of after it. The in-panel filter ('/') is now fuzzy: the
letters you type only have to appear in order, somtcfindsmy_test.c, and
the closest matches rank to the top. Andsopens a small sort menu (Name /
Size / Modified / Type plus a direction toggle) instead of blind-cycling, so you
can see and pick the sort.n/s/m/tin that menu jump straight to a mode,
andrflips the direction.explorenow remembers your cursor position per directory. Scroll down to
a file deep in a long listing, step into a subdirectory, come back, and the
cursor is right where you left it instead of jumping to the top or landing on a
stale row. The position is kept for every directory you visit (and even across
separateexploreruns in the same shell session). Picking a specific file from
the Ctrl-K / Ctrl-P / Ctrl-G finders still lands you on that file, and each tab
keeps its own independent position.explorediffs now label each hunk with its enclosing function, and the
HTML diff pairs changed lines by similarity (first slice of adelta-inspired
pass, ZY-033). For code files, every@@ … @@hunk header, in both the
in-terminal diff viewer and the HTML page, now shows the enclosing function it
falls in (from git's hunk-header context), styled distinctly. And the HTML
side-by-side page pairs a
deletion with the most similar following addition (a width-weighted token
distance, ported from delta) instead of pairing by position, so unrelated lines
are no longer word-diffed against each other and genuine edits line up.- The in-terminal
explorediff viewer got the same delta-style upgrades
(ZY-033 cont.): the code is now syntax-highlighted (colours layered over the
red/green change tint),n/Njump to the next/previous change, the
filename in the header is a clickable link to the file, and the line-number
gutter auto-sizes to the file (tighter for small files, correct for large
ones). explorediffs highlight merge-conflict markers, and the terminal viewer can
wrap long lines (ZY-033 final).<<<<<<</=======/>>>>>>>conflict
markers are styled distinctly in both the terminal viewer and the HTML page; and
win the terminal diff viewer toggles soft-wrapping of long lines (with the
syntax colours carried across the wrap) instead of truncating them.- The HTML diff page's file list is now a collapsible directory tree
(github.dev-style) instead of a flat list of basenames. Files nest under their
folders, single-child folder chains collapse into one row
(zy_src/08_ui/src/explorer), each folder shows its combined +/- count, and
clicking a folder folds it. explore"open as HTML" can now render fully offline. The viewer'sh
(and the file list'sH) write a standalone HTML page and open it in your
browser. Previously every asset (highlight.js, KaTeX, Mermaid, web fonts) was
pulled from a CDN, so the page lost all syntax colour, math, and diagrams with
no network. zy now prefers a local bundle, resolved from~/.zy/assets,
/usr/share/zy/assets(the.deb), or the dev tree, and falls back to the CDN
only when no bundle is present. Populate the bundle once with
scripts/dev/fetch-html-assets.sh. SetZY_HTML_ASSETS=bundledto never touch
the network, orcdnto force the old behaviour.- The HTML markdown renderer gained real GFM coverage: nested ordered/unordered
lists (by indentation), task lists (- [ ]/- [x]), strikethrough
(~~text~~), bare and<angle>autolinks (including<email>), hard line
breaks (two trailing spaces),+bullets, consumed YAML frontmatter, setext
headings (===/---underlines), reference-style links ([text][ref]and
collapsed[text][]), and footnotes ([^id]references with a back-linked
notes section). Raw inline HTML stays escaped on purpose, since the source file
is untrusted. The header docstring previously claimed features that did not
exist; it now matches what the renderer actually does. explore's "open as HTML" now has dedicated rich renderers for more file
types instead of dumping everything into a<pre>: images show the actual
picture (with pixel dimensions) on a transparency checkerboard; SVGs render as
an image with a RENDER/SOURCE toggle (embedded scripts never execute); CSV/TSV
become a sortable, filterable table; JSON becomes a collapsible tree with a RAW
toggle; and PDFs are handed straight to the browser, which renders them
natively.- The HTML diff page is now a whole-changeset view with a file-tree
sidebar (like github.dev "Files changed"): pressingh/Hexports every
changed file, not just the focused one. The sidebar lists each file with its
+/−counts, jumps to it, marks it viewed (collapsing it, remembered in your
browser), and tracks the active file as you scroll; each file gets a sticky
in-table header you can collapse, and the page auto-scrolls to the file you
invoked it on. Plus inline comment threads: double-click a line to attach
review comments (multiple per line, stored locally per file+line, deletable). - The HTML diff page caught up to github.dev / VS Code. New: intra-line
word/character diff (only the changed tokens are tinted, on top of syntax
colour); jump to next/previous change withn/Nand an "i of N" counter;
a change-density minimap rail; find-in-diff (/); sticky hunk headers;
collapse/expand of unchanged context (the export now fetches a wide 25-line
band so you can reveal surrounding lines in-page); horizontal scrolling for
long lines (the side-by-side table grows to the widest line instead of
clipping it); word-wrap (w) to switch to wrapping, plus show-
whitespace, and a colour-blind-safe palette toggle; per-hunk copy buttons;
click-a-line-number permalinks; double-click-to-attach local review notes
(stored in your browser); a?keyboard-help overlay; and screen-reader
change announcements. All client-side in the standalone page.
Changed
- The
.debnow declares the optional tools it can use, and the installer offers
the preview ones. Installing zy recommendsgit(so the prompt's git modules and
explore's status column work out of the box), and suggestschafa,poppler-utils,
ffmpeg,ghostscript,xdg-utils,neovim, andripgrep, the tools that enable
image/PDF/video previews, the HTML-export "open in browser", open-at-line, and the rg
grep picker. zy still runs fine without any of them (every feature degrades
gracefully), butapt show zynow surfaces them. And the interactive installer adds
an "Enable rich previews" step (alongside the existing Neovim/fonts prompts) that
offers to install whichever of chafa/poppler-utils/ffmpeg/ghostscript you're missing,
so explore's image, PDF, video and PostScript thumbnails work right after install. explore's sidebar stays visible when you focus the preview pane. It used to
disappear the moment you tabbed into the preview (to give the preview more width),
which made the bookmarks/pinned/disks column flicker in and out as you moved focus.
The sidebar now stays put; the preview still widens a little when it has focus.- The exported HTML page now reads the source file once instead of two or three
times, gates KaTeX to markdown (source and diff pages drop three render-blocking
requests), marks scriptsdeferso they no longer block first paint, and skips
client-side highlighting plus per-line anchors on very large files so a multi-MB
file can't hang the page. - The diff page caught up to the document viewer: the same three-way theme cycle
(dim/paper/ink) and keyboard navigation (j/k, space/b,g/G,t,s/u,
p). Both pages now follow the OS light/dark preference on first open, and the
side-by-side diff table carries an ARIA label. Muted text contrast was nudged up
for readability.
Fixed
explore's sidebar keeps its section titles visible when you scroll back to
the top. The cursor only lands on the selectable rows (bookmarks, pinned
folders, disks, recents), never on a section header, so scrolling all the way up
used to stop one row below "BOOKMARKS" and clip the title off the top. Scrolling
up now pulls the header (and any blank line above it) back into view, so a section
always shows with its title.explore's sidebar border no longer jogs left on the DISKS rows. The disk
usage chip ("36%", "1%") was counted as one cell wider than it actually drew, so
every percentage row came up one column short and the sidebar's right border bent
inward on exactly those lines. The chip width now matches what gets drawn, so the
rows fill the full width and the border stays straight, while keeping the bit of
breathing room before the edge ("36% │").explore's directory preview keeps its file-size column straight now. The
sizes sat a fixed gap after each filename, so a long name pushed its size to the
right and the column went ragged. Sizes now right-align to the preview pane's
right edge no matter how long the filenames are.explore's bottom strip now lines up with the panes above it. The METADATA,
SELECTION and STATUS boxes used their own width split, so their borders didn't
match the SIDEBAR / TREE / PREVIEW columns and the layout looked like two
unrelated grids stacked together. The bottom strip now shares the top panes'
column boundaries, so the whole frame reads as one clean grid (it keeps the old
independent split only in split-view or on a terminal too narrow for the
sidebar).explore's file list now lines up its directory/and git-status column.
A directory with a git status had its trailing/shifted two cells left of a
clean directory's, so the right edge of the list looked ragged once the tree had
any modified or untracked files. The git-status gutter is now always reserved, so
the slash and chip columns align on every row.- The diff and document HTML pages share one theme-preference key, but the diff
page only understood paper/ink, so selecting "dim" on a document page left the
diff page falling back to paper. Both pages now understand all three themes. - The
exploreHTML diff page (hin the diff viewer,Hin the file list)
got a thorough correctness pass. A review of the page turned up a batch of bugs
that could make the rendered diff wrong, incomplete, or unprintable, now all
fixed (ZY-032):- A changed line whose text starts with
--or++(an SQL or Lua comment, a
Markdown rule, a diff of a diff) was read as a file header and silently dropped
from the page, which also threw off the +/- counts and every following line
number. Those lines now render as the deletions and additions they are. - In a multi-file diff every file was syntax-highlighted as the invoked file's
language, and an unterminated comment or string in one file's visible context
leaked its colouring into the rest of the page. Each file is now highlighted as
itself, and that state can no longer cross a file boundary. - A block of more than ~4000 consecutive added or deleted lines had its overflow
quietly dropped. Every line now renders, and a changeset that truly hits a hard
size cap shows a visible "truncated" banner instead of looking complete. - "Save as PDF" could export a near-empty page (rows that were never scrolled
into view came out blank) on a black background under the dim and ink themes.
Printing now lays out the whole diff on a light page and hides the toolbar,
minimap, find bar, and help overlay. - Unchanged context lines were indented one column to the right of changed lines;
and\ No newline at end of file, rename/copy metadata, and Windows carriage
returns no longer leak into the rendered diff. - Change navigation (
n/N), the minimap, and find-in-diff now stay in sync
after you fold context, collapse a file, or switch split/unified. Line-number
permalinks point at a real anchor and restore on load. Inline review comments
key off the file path and the side of the diff, so they no longer attach to the
wrong line and they survive re-exporting the page. Binary files show a
"Binary files differ" note instead of an empty body. - The word-wrap toggle no longer leaves a stuck horizontal scrollbar in split
view (the code columns were pinned to 50% each, which ignored the line-number
and marker gutters), and wrapped rows no longer make the page jump while
scrolling (the offscreen-row size estimate assumed one line per row). - Split view now fits the window with both the old and new columns visible. It
used to size the columns to the single longest line in the whole changeset, so
one very long line (a big table row, minified code, a long CSS string) pushed
the new-version column far off-screen and the page looked half-empty. It now
works like the github.dev side-by-side editor: the two columns split the width
and each one scrolls horizontally on its own (a slim scrollbar under each
column), so a long line on one side never disturbs the other. Pressw(or
the WRAP button) to wrap long lines instead.
- A changed line whose text starts with
exploreno longer crashes (SIGBUS) when browsing a directory whose files are
being edited or rebuilt (e.g. exploring the source tree you're actively
make-ing). The fff background indexermmaps files and scans them; if a file
is truncated while a scan runs, touching the now-missing pages raises SIGBUS, a
race that can't be closed at themmapcall (anfstatonly bounds the size at
map time, not during the read). zy now installs a SIGBUS recovery handler that
maps a zero page over the faulting page so the read sees the truncated tail as
zeros and continues, instead of aborting; a file caught mid-truncation yields a
best-effort scan and is re-indexed on the next rebuild. The hot per-file scan
paths additionallyread()into a heap buffer so they don't fault at all in the
common case. (ZY-029)zy --crash-reportnow reads the real crash log at~/.zy/crash.loginstead of
reporting "no crash reports found" against the stale/tmp/zy_crash.log
fallback path (the path is resolved before reading, not only during signal
setup). (ZY-030)- Crash-reporting hardening, from a full audit of the subsystem (ZY-031).
zy --crash-reportnow prints the most recent report (it used to dump the entire
append-only log) and exits non-zero when there is no report. The crash log is
capped and rotated tocrash.log.1so a crashy machine can't grow it without
bound, and when$HOMEis unset the report goes to stderr only rather than a
shared, collision-prone/tmp/zy_crash.log. The handler itself is more robust:
it pre-warms the stack unwinder at startup (so the in-handlerbacktrace()can't
deadlock on a first-calldlopen), formats the timestamp with pure arithmetic
instead ofgmtime_r, preserveserrnoacross SIGBUS recovery, and uses a
one-winner latch so simultaneous crashes on multiple threads can't interleave
reports. New fork-isolated regression tests cover crash capture and SIGBUS
recovery.
Security
- Fixed a command-injection in the
explorePDF preview (ZY-034). The preview
ranpdftotextthrough/bin/shwith the filename spliced in unquoted, so a
file named something like;touch PWNED;.pdf(or with backticks or$()) ran
as a command the moment you moved the cursor onto it, no confirmation needed. The
preview now runspdftotextdirectly with the filename passed as a plain
argument, so there is no shell to inject into, and it gained a 1.5s timeout so a
bad PDF can't hang the pane. - Escaped the file path written into the
vscode://"CODE" link, so a filename
containing a quote can no longer break out of the attribute and inject markup. - HTML-escaped the contents of
```math/```latexfenced blocks (previously
emitted verbatim). - Markdown links using
javascript:,data:,vbscript:, orfile:schemes are
now rendered as inert text instead of live links. - Mermaid runs at
securityLevel: 'strict'(was'loose') since diagram source is
untrusted file content, and every page carries a Content-Security-Policy that
blocks plugin embeds and<base>hijacking. - Leftover
/tmp/zy_view-*.htmlexport files older than six hours are reaped on
each export instead of accumulating indefinitely.
Verify your download
curl -LO https://github.com/iskandarputra/zyshell/releases/download/v1.0.42/zy_1.0.42_amd64.deb
curl -LO https://github.com/iskandarputra/zyshell/releases/download/v1.0.42/SHA256SUMS
curl -LO https://github.com/iskandarputra/zyshell/releases/download/v1.0.42/SHA256SUMS.minisig
curl -LO https://github.com/iskandarputra/zyshell/releases/download/v1.0.42/zy-release.pub
minisign -Vm SHA256SUMS -p zy-release.pub # confirms maintainer signature
sha256sum -c SHA256SUMS --ignore-missing # confirms the .deb hash matchesFull signing policy: docs/ops/RELEASE_SIGNING.md
VirusTotal scan
This release was uploaded to VirusTotal at publish time. Click through to see the live verdict from 65+ AV engines:
(Scans run within ~5 minutes of upload. If the page shows "Item not found", wait a moment and refresh.)
Try without installing
docker run --rm -it ghcr.io/iskandarputra/zyshell:1.0.42Install (Debian / Ubuntu)
The recommended path is the zy APT repository which handles upgrades automatically:
curl -1sLf 'https://dl.cloudsmith.io/public/iskandarputra/zyshell/setup.deb.sh' | sudo -E bash
sudo apt install zyOr direct .deb install:
sudo dpkg -i zy_1.0.42_amd64.deb
sudo apt-get install -f