On 19.02.2026 07:16, Thomas Kupper wrote:


On 19.02.2026 00:26, izzy Meyer wrote:
On Wed, 18 Feb 2026 16:53:39 -0600
izzy Meyer <[email protected]> wrote:

Hello ports@

I've been feeling really motivated lately with exfetch and added some
new features to it (see changelog below). I want to get this out into
the wild as soon as possible, so people can play around and test it on
their machines.

Here's a simple update to sysutils/exfetch to a tag with these new
features.

Tested on amd64, works good.

I'd like someone to test these new changes before they commit if
that's ok.

- Offset works for me:

grumpy$ exfetch -f 7 -a OpenBSD

                 USER   -> [email protected]
                 OS     -> OpenBSD
                 VER    -> 7.8
                 UPTIME -> 37 days, 11:17
                 DE/WM  -> unknown
                 TERM   -> screen
                 SHELL  -> ksh
       _____     CPU    -> Intel Xeon CPU E5-2630 0 @ 2.30GHz
     \-     -/   GPU    -> unknown
  \_/ .`  ,   \  PKGS   -> 175
  | ,    , 0 0 | LOAD   -> 1m: 0.33, 5m: 0.26, 15m: 0.43
  |_  <   }  3 | SWAP   -> 11.43 / 1264.00 MiB
  / \`   . `  /  MEM    -> 52.32 / 1007.99 MiB
     /-_____-\


I understand providing a negative value will raise an ArgumentError as you mentioned in the man page.

Is there a more elegant way than to show the whole call stack? Handle it similar like the color (-c|--color) argument?

grumpy$ exfetch -f -7 -a OpenBSD
Unhandled exception: ASCII offset cannot be negative. ILLEGAL (ArgumentError)
   from exfetch in '__register_frame_info'
   from exfetch in '__register_frame_info'
   from exfetch in 'main'
   from exfetch in 'main'
   from exfetch in '__start'

- Text-Only works as expected:

grumpy$ exfetch -c 1 -f 1 -a OpenBSD | tee output.with.escape
grumpy$ exfetch -c 1 -T -f 1 -a OpenBSD | tee output.without.escape

grumpy $ grep -c '\[' output.with.escape
13
grumpy $ grep -c '\[' output.without.escape
0

One additional note, not related to the update: sorting the arguments in alphabetical order in the man page would be helpful, I think.


/usr/ports/sysutils/exfetch git:(master+) $ make test
===>  Regression tests for exfetch-1.5.2
crystal spec --no-color -v -s -t -p --release
Parse:                             00:00:00.000283360 (   0.90MB)
Semantic (top level):              00:00:01.564889146 ( 124.76MB)
Semantic (new):                    00:00:00.004672048 ( 124.76MB)
Semantic (type declarations):      00:00:00.084020180 ( 124.76MB)
Semantic (abstract def check):     00:00:00.045015596 ( 124.76MB)
Semantic (restrictions augmenter): 00:00:00.016167933 ( 124.76MB)
Semantic (ivars initializers):     00:00:00.933157956 ( 196.82MB)
Semantic (cvars initializers):     00:00:00.023979597 ( 196.82MB)
Semantic (main):                   00:00:00.734872077 ( 228.95MB)
Semantic (cleanup):                00:00:00.001088280 ( 228.95MB)
Semantic (recursive struct check): 00:00:00.002413409 ( 228.95MB)
Codegen (crystal):                 00:00:00.943954401 ( 260.95MB)
Codegen (bc+obj):                  00:00:24.314646013 ( 260.95MB)
Codegen (linking):                 00:00:00.853759568 ( 260.95MB)
Macro runs:
  -
/usr/ports/pobj/exfetch-1.5.2/exfetch/lib/baked_file_system/src/ loader.cr:
reused previous compilation (00:00:00.023271315)

Codegen (bc+obj):
  - no previous .o files were reused
Exfetch::CLI
   .colorize
     wraps text in ansi codes
     handles bright colors
   .render
     renders output string
Exfetch::Manip
   .bytes_to_mebibytes
     converts bytes to mebibytes string
   .sanitize
     removes newlines and strips whitespace
   .has_command?
     returns true for existing commands
     returns false for non-existing commands
   .run_command
     runs a command and returns output
     returns empty string on failure
   .dir_size
     returns 0 for non-existent dir
Exfetch::Options
   .parse
     parses default options
     parses flags
     parses color argument
     parses padding
Exfetch::Resource
   .get_short_info
     returns basic info
   .get_uptime
     parses uptime correctly when mocked
   .get_shell
     returns shell basename
   .get_cpu
     returns cpu info

Finished in 13.04 milliseconds
18 examples, 0 failures, 0 errors, 0 pending
Execute: 00:00:00.059692262

Changelog:
* Since(1.5.1)

Misc Changes:

Optimizations:

Bugfixes:

New features:
- Added -T and --text-only options to disable ansi escape seqences
- Added -f LINES and --ascii-offset=LINES options to offset ASCII by
LINES


Whoops, caused a bug in the offset code where ascii art would cut off
if there wasn't a corresponding label on that line. here's a new diff.
git tag bumped to 1.5.2.1, future versions will return to the X.Y.Z
format.



Reply via email to