Skip to content

Xylem v0.8.0

Choose a tag to compare

@github-actions github-actions released this 20 Nov 02:27
· 62 commits to main since this release

Some Alt keys changed

Ctrl and Alt now mean two different things:

  • Ctrl+letter acts on the tagged files, as before: Ctrl+C copies them,
    Ctrl+D deletes them, Ctrl+T tags everything.
  • Alt+letter is the other version of a command. In the tree it acts on
    the whole branch (Alt+P Prune, Alt+R Release); in the file window, on the
    tagged files keeping their paths (Alt+C, Alt+M); and it opens the tools
    (Alt+U Usage, Alt+D Duplicates, Alt+S Sort, Alt+X the terminal).

Up to 0.7, several Alt keys only repeated the Ctrl ones. These changed:

Key Up to 0.7 From 0.8
Alt+A Attributes of the tagged files nothing (use Ctrl+A)
Alt+D delete the tagged files Duplicates (to delete the tagged files: Ctrl+D)
Alt+R rename the tagged files Release the branch, the same as - (to rename the tagged files: Ctrl+R)
Alt+T tag everything nothing (use Ctrl+T)
Alt+U untag everything Usage (to untag everything: Ctrl+U)
Alt+W Usage nothing (use Alt+U)
Alt+Y Duplicates nothing (use Alt+D)

If you used Alt+D to delete the tagged files: it now opens Duplicates,
which deletes nothing without asking first.

To keep the old keys, add them to [keys.any] in config.toml, one or
all of them. All of them, as they were up to 0.7:

[keys.any]
"alt+a" = "attributes_tagged"
"alt+d" = "delete_tagged"
"alt+r" = "rename_tagged"
"alt+t" = "tag_all"
"alt+u" = "untag_all"
"alt+w" = "usage"
"alt+y" = "duplicates"

They work in both windows, Alt+R in the tree included, and Release is still
on -. If you already set keys of your own in [keys], those stay as you
set them. To see the keys in effect, press K in the help (F1).

The manual explains all this in "What Ctrl and Alt mean", on the tagging page.

Every command is in a menu

Before, some commands worked but appeared in no menu. Now each one has its
place in the footer:

  • N New date (Ctrl+N for the tagged files), A Available (in the tree),
    ? statistics, \ Treespec;
  • F5 and Ctrl+F5 for archives, F7 Autoview, F12 setup;
  • Ctrl+B Batch, Ctrl+S Search and Ctrl+V View of the tagged files;
  • Ctrl+F7, Ctrl+F8 and Ctrl+F9 to tag, untag and invert the whole branch;
  • Alt+Q to quit and leave the shell in the current folder.

For that, the footer usually takes three lines instead of two: the
commands by letter, in alphabetical order, on the first two, and the function
keys and symbols on the third. On a screen wide enough for every menu to fit,
it keeps two lines, so the tree loses no line there.

The menus also show only what works where you are. Inside an archive, they
leave out what would write to it. On a remote machine, they now show
everything that works there, including Delete, Makedir, Move, Rename,
Attributes and New date, which the old menu left out.

Menus on a narrow screen

When a menu does not fit the width of the window, its words are first
shortened, all by the same amount and always keeping the highlighted letter.
Only if that is not enough do the last entries leave, with a … where they
were. F9 (or Esc) always stays.

Tables with no limit of 50,000 rows

With V, a CSV or TSV file, JSON Lines, a dBase file (.dbf), and a table,
view or query of a SQLite database show all their rows, however many. The
grid keeps the rows near the cursor and reads the others as you move, with the
screen always free: a row not read yet shows as … for a moment.

  • The total shows while it is counted, 2,000+ (counting…), and then the
    real number. Ctrl+End goes to the last row and g to any.
  • The filter (&) goes over the whole table, in the background, saying how
    far it got; the matches show as they are found, up to 1,000,000.
  • Esc stops the count or the filter, keeping what they found so far.
  • When the file changes while it is open, Xylem stops reading it and says
    so: R reads it again.
  • A big table opens at once: its text and hex are read only when you go to
    them (T, H). A 330 MB database that took seconds now opens right away.

Spreadsheets (XLSX, XLSB, XLS, ODS) cannot be read in parts and keep the limit
of 50,000 rows; past it, the header says so and O opens the sheet in your
spreadsheet program. Autoview (F7) still reads only the first rows. Parquet
comes in a later version.

Query files with a SQL condition (W, Alt+N)

You can now filter the file window with a SQL condition (the WHERE clause)
over file attributes or their contents:

  • W filters the files of the list; Ctrl+W looks only at the tagged
    files. Columns include name, ext, path, dir, depth, size, disk,
    modified, age_days, mode, kind, and tagged.
    ext = 'jpg' AND size > 10000000
    ext IN ('md', 'txt') AND age_days < 7
  • contains('text') searches inside file contents without an index. It runs
    in steps with Esc to cancel; before reading, it asks and tells how many files
    and bytes will be read.
    ext IN ('md', 'txt') AND contains('invoice')
  • words('text') looks for whole words (and prefixes like words('fatur*'))
    without case or accents.
  • Alt+N indexes a branch using tantivy so that words() answers
    immediately:
    • The index is built only when asked (never in the background).
    • It stays in your cache (~/.cache/xylem/index/ on Linux; %LOCALAPPDATA%\xylem\cache\index on Windows).
    • To update or delete the index, press Alt+N on the branch again.
    • Files over 64 MiB, binary files, symlinks, build directories (target, node_modules), .git, and secret files (.env, *.key, *.pem, id_rsa) are left out.

Note: W, Ctrl+W, and Alt+N are provisional keys.

The search box (P)

P opens a box over the screen that lists files by the words in them as
you type (Ctrl+P: among the tagged files). Indexed branches (Alt+N)
answer at once; files not in an index are read only after you confirm. Enter
goes to the file, Ctrl+V opens it in the viewer at the line found, Ctrl+T
tags it.

The mouse

Xylem is still made for the keyboard, and the mouse is off until you turn
it on: F12, page 2, R (or mouse = true). Then:

  • a click picks a directory or a file, or presses the key written in the
    footer; a double click is Enter in the tree and View on a file (never a
    program of the system: a click by mistake must not run a hostile file);
  • the wheel scrolls the list under the pointer, also the other side of a
    split screen; the scroll bar can be dragged;
  • the middle button or Ctrl+click tags a file, Shift+click tags a range;
  • the right button opens a menu of what can be done with the item under
    the pointer, each line with its key. The Menu key or Shift+F10 opens
    it from the keyboard;
  • the programs of the built-in terminal and the framed editor (mc, vim, htop,
    tmux) get the mouse when they ask for it, inside their own panel.

A click never does what its key would not: Delete still asks. With the mouse
on, hold Shift (Option in iTerm2) to select text in the terminal.

Seven new viewers

Each one shows what the file holds, and what in it deserves a second look.
Nothing is ever run, loaded or fetched.

  • JSON, YAML and TOML as a tree that folds, with the path of each node
    (k copies it). A key that appears twice is marked; YAML aliases are never
    expanded.
  • Logs with the colors of their levels and their own ANSI colors (other
    sequences are dropped and counted), and follow: at the end, new lines
    come in as they are written.
  • Patches with an index of files and hunks (] [, } {, Tab), and
    what to check in red: a file made executable, a symlink, a path into .git
    or out with .., lines that only look unchanged.
  • Jupyter notebooks, cell by cell, with their outputs.
  • Office documents (Word, OpenDocument, PowerPoint, Impress) as text,
    after a block that tells what does not show in the program that made them:
    macros, remote templates (as in Follina), tracked changes, hidden text.
  • Executables (ELF, PE, Mach-O) as a report: protections (PIE, NX, RELRO,
    ASLR, CFG...), a signature (shown, not verified), signs of packing or of
    data after the last section, the libraries and symbols.
  • Certificates and keys (PEM, DER, OpenSSH, authorized_keys,
    known_hosts) as a report: validity, weak keys and signatures, the order of
    a chain, fingerprints. A private key shows only its kind and size, never
    its numbers, also in Autoview.

The viewer, otherwise

  • A text of any size: with V, a file on disk over 16 MiB is read through a
    window, as the tables are. Lines are counted, searched and filtered in the
    background, and Esc stops them.
  • A record as a form: in a table, Enter shows the record under the
    cursor a field per line; ← → go to the next or previous record, and c
    copies it. In the structure of the table (i), c now copies the list of
    columns too.

macOS

Xylem now builds on macOS (thanks to @zoomosis, #123), and CI checks it.
There is no macOS package yet and it is not tested on a Mac: install it with
cargo install xylem-fm. A file that grows in a directory on screen keeps
its old size there until the directory is read again.

Smaller things

  • Several terminals side by side: the manual now shows how to run tmux in
    the built-in terminal (Alt+X) and split it into panes. With tmux, the tree
    follows only the shell Xylem started, and the tmux session goes on after
    Xylem closes.
  • Seconds in the clock: F12, page 2, Q (or clock_seconds = true).
    Off by default.
  • B in Branch or Showall goes back to the folder's own list, instead of
    building the same Branch again.
  • The small file window under the tree now takes a quarter of the screen's
    height, with at least 3 files: more files on a tall terminal, more tree on a
    short one. On an ordinary 34-line screen it looks as before.
  • The history of a prompt is a list: ↑ opens it just above the line, with
    the last entry at the bottom. Typing filters it, Enter puts an entry in the
    line (another Enter confirms), Del takes it out for good and Esc closes it.
    ↓ no longer goes through the entries one by one; in the Batch of the viewer,
    PgUp opens the list.
  • Treespec (/): Ctrl+← takes the last folder off the path, and Ctrl+→
    brings them back one by one.

Install

Download the archive for your system below (Linux x86_64 or ARM64, static;
Windows x86_64), a .deb or .rpm package, or cargo install xylem-fm. The
website: https://andrelnfernandes.github.io/xylem/

What's Changed

New Contributors

Full Changelog: v0.7.0...v0.8.0