2020-10-29 19:21:24 +01:00
|
|
|
\" https://mandoc.bsd.lv/man/roff.7.html#Sentence_Spacing
|
2020-10-27 04:05:54 +01:00
|
|
|
.Dd October 27, 2020
|
2020-10-26 20:46:09 +01:00
|
|
|
.Dt SDN 1
|
|
|
|
.Os Linux
|
|
|
|
.Sh NAME
|
|
|
|
.Nm sdn
|
2020-10-27 04:05:54 +01:00
|
|
|
.Nd directory navigator
|
2020-10-26 20:46:09 +01:00
|
|
|
.Sh SYNOPSIS
|
|
|
|
.Nm sdn
|
|
|
|
.Op Ar line Ar point
|
2020-10-27 04:05:54 +01:00
|
|
|
.Nm sdn
|
|
|
|
.Cm --version
|
2020-10-26 20:46:09 +01:00
|
|
|
.Sh DESCRIPTION
|
|
|
|
.Nm
|
2020-10-27 04:05:54 +01:00
|
|
|
is a simple directory navigator that you can launch while editing shell
|
2020-10-29 19:21:24 +01:00
|
|
|
commands.
|
|
|
|
Use the
|
2020-10-26 20:46:09 +01:00
|
|
|
.Xr sdn-install 1
|
2020-10-27 04:05:54 +01:00
|
|
|
script to integrate it with your shell, then invoke it at any time with M-o.
|
|
|
|
.Pp
|
|
|
|
Press F1 to get a list of active key bindings and their assigned actions,
|
|
|
|
grouped by their contexts.
|
|
|
|
.Pp
|
|
|
|
Program arguments are only used by integration snippets to forward the parent
|
2020-10-29 19:21:24 +01:00
|
|
|
shell's command line.
|
|
|
|
The
|
2020-10-27 04:05:54 +01:00
|
|
|
.Ar point
|
|
|
|
is given in terms of characters.
|
|
|
|
.Sh OPTIONS
|
|
|
|
While some behaviour can be toggled from within the program, some can only be
|
|
|
|
changed by modifying configuration files manually.
|
|
|
|
.Pp
|
|
|
|
The files follow a simple syntax derived from the Bourne shell: each option is
|
2020-10-29 19:21:24 +01:00
|
|
|
on its own line, with words separated by linear whitespace.
|
|
|
|
Comments start with a hash (#) and continue until the end of the line.
|
|
|
|
All special characters may be quoted using either a backslash or single-quoted
|
|
|
|
strings.
|
2020-10-27 04:05:54 +01:00
|
|
|
.Pp
|
|
|
|
The options and the default key bindings controlling them are as follows:
|
|
|
|
.Bl -tag
|
|
|
|
.It full-view Em bool No (t)
|
|
|
|
If non-zero, the equivalent format to
|
|
|
|
.Ql ls -l
|
|
|
|
is used to display directory contents rather than simply listing the filenames.
|
|
|
|
.It gravity Em bool
|
|
|
|
If non-zero, all entries stick to the bottom of the screen, i.e., all empty
|
|
|
|
space is at the top.
|
|
|
|
.It reverse-sort Em bool No (R)
|
|
|
|
If non-zero, the order of entries is reversed.
|
|
|
|
.It show-hidden Em bool No (M-.)
|
|
|
|
If non-zero, filenames beginning with a full stop are shown.
|
|
|
|
.It ext-helpers Em bool
|
2020-10-29 19:21:24 +01:00
|
|
|
If non-zero, viewers and editors are launched from the parent shell.
|
|
|
|
This way you can suspend them and use job control features of the shell.
|
|
|
|
However it also enforces any pending change to the shell's working directory.
|
2020-10-27 14:46:04 +01:00
|
|
|
.It sort-column Em number No (< >)
|
2020-10-27 04:05:54 +01:00
|
|
|
The zero-based index of the
|
|
|
|
.Ql full-view
|
|
|
|
column that entries are ordered by.
|
|
|
|
.El
|
2020-10-26 20:46:09 +01:00
|
|
|
.Sh ENVIRONMENT
|
|
|
|
.Bl -tag -width 15n
|
|
|
|
.It Ev LS_COLORS
|
2020-10-29 19:21:24 +01:00
|
|
|
Used to retrieve filename colours.
|
|
|
|
The format is described in
|
2020-10-26 20:46:09 +01:00
|
|
|
.Xr dir_colors 5
|
|
|
|
and you can use the
|
|
|
|
.Xr dircolors 1
|
|
|
|
utility to initialize this variable.
|
|
|
|
.It Ev PAGER
|
|
|
|
The viewer program to be launched by the F3 key binding as well as to show
|
2020-10-29 19:21:24 +01:00
|
|
|
the internal help message.
|
|
|
|
If none is set, it defaults to
|
2020-10-27 04:05:54 +01:00
|
|
|
.Xr less 1 .
|
2020-10-26 20:46:09 +01:00
|
|
|
.It Ev VISUAL , Ev EDITOR
|
2020-10-29 19:21:24 +01:00
|
|
|
The editor program to be launched by the F4 key binding.
|
|
|
|
If neither variable is set, it defaults to
|
2020-10-27 04:05:54 +01:00
|
|
|
.Xr vi 1 .
|
2020-10-26 20:46:09 +01:00
|
|
|
.El
|
|
|
|
.Sh FILES
|
|
|
|
.Bl -tag -width 25n -compact
|
|
|
|
.It Pa ~/.config/sdn/config
|
2020-10-27 04:05:54 +01:00
|
|
|
Program configuration and navigation state, initialized or overwritten on exit.
|
2020-10-26 20:46:09 +01:00
|
|
|
.It Pa ~/.config/sdn/bindings
|
2020-10-27 04:05:54 +01:00
|
|
|
Custom key binding overrides.
|
2020-10-26 20:46:09 +01:00
|
|
|
.It Pa ~/.config/sdn/look
|
|
|
|
Redefine terminal attributes for UI elements.
|
|
|
|
.El
|
2020-10-27 04:05:54 +01:00
|
|
|
.Sh EXAMPLES
|
|
|
|
.Ss Pa bindings
|
|
|
|
Key names or combinations follow the Emacs syntax for Control and Meta prefixes
|
|
|
|
and
|
2020-10-29 19:21:24 +01:00
|
|
|
.Xr terminfo 5
|
|
|
|
names are used for special keys.
|
|
|
|
To obtain more vifm-like controls and Windows-like quit abilities:
|
2020-10-27 04:05:54 +01:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
normal h parent
|
|
|
|
normal l choose
|
|
|
|
normal M-f4 quit
|
|
|
|
.Ed
|
2021-07-07 20:30:46 +02:00
|
|
|
.Pp
|
|
|
|
Midnight Commander binds the same traversal actions to sequences normally
|
|
|
|
unknown to ncurses, due to them being missing from terminfo.
|
|
|
|
You'll need to define them manually to match your terminal.
|
|
|
|
For rxvt, that would be:
|
|
|
|
.Bd -literal -offset indent
|
|
|
|
define C-ppage ^[[5^
|
|
|
|
define C-npage ^[[6^
|
|
|
|
normal C-ppage parent
|
|
|
|
normal C-npage choose
|
|
|
|
.Ed
|
|
|
|
.Pp
|
|
|
|
Escape characters must be inserted verbatim, e.g., by pressing C-v ESC in vi,
|
|
|
|
or C-q ESC in Emacs.
|
2020-10-27 04:05:54 +01:00
|
|
|
.Ss Pa look
|
|
|
|
Terminal attributes are accepted in a format similar to that of
|
2020-11-05 01:24:05 +01:00
|
|
|
.Xr git-config 1 ,
|
2020-10-29 19:21:24 +01:00
|
|
|
only named colours aren't supported.
|
|
|
|
For a black-on-white terminal supporting 256 colours, a theme such as the
|
|
|
|
following may work:
|
2020-10-27 04:05:54 +01:00
|
|
|
.Bd -literal -offset indent
|
|
|
|
cursor 231 202
|
|
|
|
bar 16 255 ul
|
|
|
|
cwd bold
|
|
|
|
input
|
|
|
|
cmdline 145
|
|
|
|
.Ed
|
|
|
|
.Sh REPORTING BUGS
|
|
|
|
Use
|
|
|
|
.Lk https://git.janouch.name/p/sdn
|
|
|
|
to report bugs, request features, or submit pull requests.
|