README: make listings libasciidoc-compatible

This commit is contained in:
Přemysl Eric Janouch 2020-08-28 18:30:49 +02:00
parent d6eaf44aee
commit 63982b3754
Signed by: p
GPG Key ID: A0420B94F92B9493
1 changed files with 10 additions and 6 deletions

View File

@ -45,7 +45,8 @@ into the PATH of any machine you want to have 'sdn' on.
zsh zsh
--- ---
To start using this navigator, put the following in your .zshrc: To start using this navigator, put the following in your .zshrc:
....
----
sdn-navigate () { sdn-navigate () {
# ... possibly zle-line-init # ... possibly zle-line-init
eval "`sdn`" eval "`sdn`"
@ -56,13 +57,14 @@ sdn-navigate () {
} }
zle -N sdn-navigate zle -N sdn-navigate
bindkey '\eo' sdn-navigate bindkey '\eo' sdn-navigate
.... ----
bash bash
---- ----
Here we can't reset the prompt from within a `bind -x` handler but there is Here we can't reset the prompt from within a `bind -x` handler but there is
an acceptable workaround: an acceptable workaround:
....
----
sdn-navigate () { sdn-navigate () {
SDN_L=$READLINE_LINE SDN_P=$READLINE_POINT SDN_L=$READLINE_LINE SDN_P=$READLINE_POINT
READLINE_LINE= READLINE_LINE=
@ -82,18 +84,20 @@ sdn-restore () {
bind -x '"\200": sdn-navigate' bind -x '"\200": sdn-navigate'
bind -x '"\201": sdn-restore' bind -x '"\201": sdn-restore'
bind '"\eo":"\200\C-m\201"' bind '"\eo":"\200\C-m\201"'
.... ----
Colors Colors
------ ------
Here is an example of a '~/.config/sdn/look' file; the format is similar to 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 colors aren't supported:
....
----
cursor 231 202 cursor 231 202
bar 16 255 ul bar 16 255 ul
cwd bold cwd bold
input input
.... ----
Filename colors are taken from the `LS_COLORS` environment variable. Filename colors are taken from the `LS_COLORS` environment variable.
Run `dircolors` to get some defaults. Run `dircolors` to get some defaults.