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

94 lines
1.9 KiB
Groff

.Dd Febuary 18, 2025
.Dt XD 1
.Sh NAME
.Nm XD
.Nd smiley face to explain info on the shell
.Os
.Sh SYNOPSIS
.Nm
.Op Fl v
.Op Fl e
.Op number
.Sh DESCRIPTION
.Nm
Displays information using a smiley face like so: :)
.Nm
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
.Nm
\fB-e\fR):
.Ss Eyes
.TS
tab(;) allbox;
c;l.
:;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
.TE
.Ss Nose
.TS
tab(;) allbox;
c;l.
;default
*;current git repo has staged changes
^;current git repo has untracked changes
-;git repo's HEAD is detached
.TE
.Ss Mouth
.TS
tab(;) allbox;
c;l.
|;no signal provided
);previous signal is 0
O;SIGINT sent (Ctrl-c)
P;permission denied
/;command not found
(;previous signal is failure
.TE
.Ss Exit Status:
.Nm
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
.Nm
returns 1. If you wish to find out more infomation about the error enable ERR
in the config.mk.
.Sh OPTIONS
.Ss -v
Print version information to stdout and exit.
.Ss -e
Explain the output instead of putting a smiley face.
.Sh EXAMPLES
Running
.Nm
and passing in the previous return code ($?) results in a smiley face, if you
then follow that by \fBXD -e $?\fR then you will get an explination of what the
face is explaining.
$ \fBXD $?\fR
.br
:)
.br
$ \fBXD -e $?\fR
.br
Not in a git repository.
.br
Return code of 0, no errors.
$ \fBXD $?\fR
.br
;*O
.br
$ \fBXD -e $?\fR
.br
In a git repository.
.br
There staged changes.
.br
Return code of 130, ctrl-c was pressed, or SIGTERM sent.