aboutsummaryrefslogtreecommitdiff
path: root/README.adoc
diff options
context:
space:
mode:
Diffstat (limited to 'README.adoc')
-rw-r--r--README.adoc105
1 files changed, 46 insertions, 59 deletions
diff --git a/README.adoc b/README.adoc
index 3e713af..28ff6c1 100644
--- a/README.adoc
+++ b/README.adoc
@@ -16,16 +16,21 @@ approach here, and the end result is very friendly to tinkering.
image::sdn.png[align="center"]
+Packages
+--------
+Regular releases are sporadic. git master should be stable enough.
+You can get a package with the latest development version using Arch Linux's
+https://aur.archlinux.org/packages/sdn-git[AUR],
+or as a https://git.janouch.name/p/nixexprs[Nix derivation].
+
Building
--------
Build dependencies: CMake and/or make, a C++14 compiler, pkg-config +
Runtime dependencies: ncursesw, libacl
// Working around libasciidoc's missing support for escaping it like \++
-:doubleplus: ++
-
-Unfortunately most LLVM libc++ versions have a bug that crashes 'sdn' on start.
-Use GNU libstdc{doubleplus} if you're affected.
+Unfortunately most LLVM libc{plus}{plus} versions have a bug that crashes 'sdn'
+on start. Use GNU libstdc{plus}{plus} if you're affected.
$ git clone https://git.janouch.name/p/sdn.git
$ mkdir sdn/build
@@ -45,81 +50,63 @@ Or you can try telling CMake to make a package for you. For Debian it is:
There is also a Makefile you can use to quickly build a binary to be copied
into the PATH of any machine you want to have 'sdn' on.
-zsh
----
-To start using this navigator, put the following in your .zshrc:
-
-....
-sdn-navigate () {
- # ... possibly zle-line-init
- eval "`sdn`"
- [ -z "$cd" ] || cd "$cd"
- [ -z "$insert" ] || LBUFFER="$LBUFFER$insert "
- zle reset-prompt
- # ... possibly zle-line-finish
-}
-zle -N sdn-navigate
-bindkey '\eo' sdn-navigate
-....
-
-bash
-----
-Here we can't reset the prompt from within a `bind -x` handler but there is
-an acceptable workaround:
-
-....
-sdn-navigate () {
- SDN_L=$READLINE_LINE SDN_P=$READLINE_POINT
- READLINE_LINE=
-
- eval "`sdn`"
- [[ -z "$cd" ]] || cd "$cd"
- [[ -z "$insert" ]] || {
- SDN_L="${SDN_L:0:$SDN_P}$insert ${SDN_L:$SDN_P}"
- ((SDN_P=SDN_P+${#insert}+1))
- }
-}
-sdn-restore () {
- READLINE_LINE=$SDN_L READLINE_POINT=$SDN_P
- unset SDN_L SDN_P
-}
-
-bind -x '"\200": sdn-navigate'
-bind -x '"\201": sdn-restore'
-bind '"\eo":"\200\C-m\201"'
-....
-
-Colors
-------
+Configuration
+-------------
+For a slightly more technical explanation please refer to manual pages.
+
+Integration
+~~~~~~~~~~~
+The package contains an installation script called 'sdn-install' which will bind
+'sdn' to Alt-o in your shell's initialisation file. The supported shells are:
+
+ - *zsh*: works well
+ - *bash*: minor issue: exiting the navigator confirms an empty prompt
+ - *fish*: works well
+ - *elvish*: version 0.14.1 and above, an unstable API is used, works well
++
+elvish is absolutely perverse. And so is integrating 'sdn' into it because it
+already includes a custom file manager, bound to Ctrl-N (though I find the
+ranger-like interface confusing and resource-demanding).
+
+Colours
+~~~~~~~
Here is an example of a '~/.config/sdn/look' file; the format is similar to
-that of git, only named colors aren't supported:
+that of git, only named colours aren't supported:
....
cursor 231 202
bar 16 255 ul
cwd bold
input
+cmdline 145
....
-Filename colors are taken from the `LS_COLORS` environment variable.
+Filename colours are taken from the `LS_COLORS` environment variable.
Run `dircolors` to get some defaults.
Bindings
---------
+~~~~~~~~
To obtain more vifm-like controls, you may write the following to your
'~/.config/sdn/bindings' file:
....
normal h parent
normal l choose
-normal ? help
....
-Similar software
-----------------
- * https://elvish.io/ is an entire shell with an integrated ranger-like file
- manager on Ctrl-N (I find this confusing and resource-demanding, preferring
- to keep closer to "orthodox file managers")
+Helper programs
+~~~~~~~~~~~~~~~
+The F3 and F4 keys are normally bound to actions 'view' and 'edit', similarly to
+Norton Commander and other orthodox file managers. The helper programs used
+here may be changed by setting the PAGER and VISUAL (or EDITOR) environment
+variables.
+
+While it is mostly possible to get 'mcview' working using an invocation like
+`PAGER='mcview -u' sdn`, beware that this helper cannot read files from its
+standard input, nor does it enable overstrike processing by default (F9, could
+be hacked around in 'mc.ext' by turning on the `nroff` switch for a custom file
+extension, just without actually invoking 'nroff'), and thus it can't show the
+program help. 'sdn' is currently optimised for 'less' as the pager.
Contributing and Support
------------------------