XD/XD.1
Squibid eb0f31daa7
complete rewrite in zig...
upon release v5.0 I introduced a regression through my caching system in
which I naively thought that the mtime of a directory was updated by
child directories when it actually only updates for child files.

This rewrite introduces a new caching system where instead of relying on
mtime of the index file I simply store the path to, at most, 10
untracked paths and check those before anything else. This results in
slower, but more reliable caching. However due to Zig's ease of use I
was able to bring down the overall use when statically linked to libgit2
so overall XD should be faster \o/.

I also added a visor? (O) to represent an in progress rebase.
2026-02-22 17:33:43 -05:00

1.9 KiB
Raw Permalink Blame History

XD(1)                       General Commands Manual                      XD(1)

NAME
     XD  smiley face to explain info on the shell

SYNOPSIS
     XD [-v] [-e] [number]

DESCRIPTION
     XD Displays information using a smiley face like so: :) XD does some
     special caching to run as fast as possible but there's only so much that
     can be done without relying on an external daemon. Therefore when new
     changes are made in very large repositories it may take a few seconds to
     determine if there are any changes. To interpret XD's output refer to the
     following tables (or XD -e):

   Eyes
     ┌───┬────────────────────────────────────┐
     │ : │ default                            │
     ├───┼────────────────────────────────────┤
     │ ; │ in a git repo                      │
     ├───┼────────────────────────────────────┤
     │ 8 │ in a git repo with stashed changes │
     ├───┼────────────────────────────────────┤
     │ X │ in a git repo during a merge       │
     ├───┼────────────────────────────────────┤
     │ O │ in a git repo during a rebase      │
     ├───┼────────────────────────────────────┤
     │ B │ in a git repo with no commits      │
     └───┴────────────────────────────────────┘
   Nose
     ┌───┬────────────────────────────────────────┐
     │   │ default                                │
     ├───┼────────────────────────────────────────┤
     │ * │ current git repo has staged changes    │
     ├───┼────────────────────────────────────────┤
     │ ^ │ current git repo has untracked changes │
     ├───┼────────────────────────────────────────┤
     │ - │ git repo's HEAD is detached            │
     └───┴────────────────────────────────────────┘
   Mouth
     ┌───┬────────────────────────────┐
     │ | │ no signal provided         │
     ├───┼────────────────────────────┤
     │ ) │ previous signal is 0       │
     ├───┼────────────────────────────┤
     │ O │ SIGINT sent (Ctrl-c)       │
     ├───┼────────────────────────────┤
     │ P │ permission denied          │
     ├───┼────────────────────────────┤
     │ / │ command not found          │
     ├───┼────────────────────────────┤
     │ ( │ previous signal is failure │
     └───┴────────────────────────────┘
   Exit Status:
     XD returns the number that was passed in to allow the user to re-run the
     program and get the same results. If there's an internal error XD returns
     1. If you wish to find out more infomation about the error enable ERR in
     the config.mk.

OPTIONS
   -v
     Print version information to stdout and exit.

   -e
     Explain the output instead of putting a smiley face.


EXAMPLES
     Running XD and passing in the previous return code ($?) results in a
     smiley face, if you then follow that by XD -e $? then you will get an
     explination of what the face is explaining.

     $ XD $?
     :)
     $ XD -e $?
     Not in a git repository.
     Return code of 0, no errors.

     $ XD $?
     ;*O
     $ XD -e $?
     In a git repository.
     There staged changes.
     Return code of 130, ctrl-c was pressed, or SIGTERM sent.

Nixpkgs                        Febuary 18, 2025                        Nixpkgs