: nply/hb

A handbook for UNIX

1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 
13 
14 
15 
16 
17 
18 
19 
20 
21 
22 
23 
24 
25 
26 
27 
28 
29 
30 
31 
32 
33 
34 
35 
36 
37 
38 
39 
40 
41 
42 
43 
44 
45 
46 
47 
48 
49 
50 
51 
52 
53 
54 
55 
56 
57 
58 
59 
60 
61 
62 
63 
64 
65 
66 
67 
68 
69 
70 
71 
72 
73 
.Dd April 06, 2026
.Dt HB 1
.Os
.Sh NAME
.Nm hb
.Nd Handbook for UNIX
.Sh SYNOPSIS
.Nm
.Op e|edit
.Ar [file|directory]
.Nm
.Op n|new
.Ar [-c|-m] filename
.Nm
.Op s|sync
.Ar [commit message]
.Nm
.Sh DESCRIPTION
.Nm
provides a lightweight interface for accessing and adding notes on the command line.
.Pp
.Nm
doesn't complain much and tries to work with what is available.
.Xr fzf 1
is used for fuzzy searching and it is launched by default if no options are given.
.Pp
In the case of fzf unavailability,
.Nm
simply changes directory to HB_PATH
.Pp
If
.Op sync
option is used,
.Nm
attempts a add/commit/push cycle on HB_PATH via
.Xr git 1
.Sh ENVIRONMENT
.Bl -hang -width "HB_PATH"
.It Ev HB_PATH
The location of your notebook folder. Default: $XDG_DATA_HOME/notes
.It Ev HB_HIST
The location of the history file. Default: $HB_PATH/.hbhistory
.El
.Sh Other variables
.Bl -hang -width "HB_PATH"
.It Ev FM
If
.Op edit
receives a directory, FM is used. Default: cd
.It Ev FUZZER
Program used for picking files. Default: fzf
.El
.Sh AUTHORS
.An Bharatvaj Hemanth Aq Mt bhp@nply.org
.Sh EXAMPLES
# Open last edited file. This will open the last entry in $HB_HIST
    $ hb e

# Browse notes
    $ hb e .

# Move files to notes/zettle and edit the zettle/ folder
    $ hb n -m zettle/ idea1.org idea2.md
.Sh LICENSE
.Nm
is in the public domain.
.Pp
To the extent possible under law,
the creator of this work
has waived all copyright and related or
neighboring rights to this work.
.Pp
.Lk http://creativecommons.org/publicdomain/zero/1.0/