Compare commits

..

3 Commits

2 changed files with 22 additions and 3 deletions

View File

@ -21,8 +21,11 @@ Building
Build dependencies: CMake and/or make, a C++14 compiler, pkg-config + Build dependencies: CMake and/or make, a C++14 compiler, pkg-config +
Runtime dependencies: ncursesw, libacl 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. Unfortunately most LLVM libc++ versions have a bug that crashes 'sdn' on start.
Use GNU libstdc++ if you're affected. Use GNU libstdc{doubleplus} if you're affected.
$ git clone https://git.janouch.name/p/sdn.git $ git clone https://git.janouch.name/p/sdn.git
$ mkdir sdn/build $ mkdir sdn/build
@ -101,6 +104,17 @@ 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.
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 Similar software
---------------- ----------------
* https://elvish.io/ is an entire shell with an integrated ranger-like file * https://elvish.io/ is an entire shell with an integrated ranger-like file

View File

@ -388,8 +388,8 @@ enum { ALT = 1 << 24, SYM = 1 << 25 }; // Outside the range of Unicode
#define ACTIONS(XX) XX(NONE) XX(HELP) XX(QUIT) XX(QUIT_NO_CHDIR) \ #define ACTIONS(XX) XX(NONE) XX(HELP) XX(QUIT) XX(QUIT_NO_CHDIR) \
XX(CHOOSE) XX(CHOOSE_FULL) XX(VIEW) XX(EDIT) XX(SORT_LEFT) XX(SORT_RIGHT) \ XX(CHOOSE) XX(CHOOSE_FULL) XX(VIEW) XX(EDIT) XX(SORT_LEFT) XX(SORT_RIGHT) \
XX(UP) XX(DOWN) XX(TOP) XX(BOTTOM) XX(HIGH) XX(MIDDLE) XX(LOW) \ XX(UP) XX(DOWN) XX(TOP) XX(BOTTOM) XX(HIGH) XX(MIDDLE) XX(LOW) \
XX(PAGE_PREVIOUS) XX(PAGE_NEXT) \ XX(PAGE_PREVIOUS) XX(PAGE_NEXT) XX(SCROLL_UP) XX(SCROLL_DOWN) \
XX(SCROLL_UP) XX(SCROLL_DOWN) XX(CHDIR) XX(GO_START) XX(GO_HOME) \ XX(CHDIR) XX(PARENT) XX(GO_START) XX(GO_HOME) \
XX(SEARCH) XX(RENAME) XX(RENAME_PREFILL) \ XX(SEARCH) XX(RENAME) XX(RENAME_PREFILL) \
XX(TOGGLE_FULL) XX(REVERSE_SORT) XX(SHOW_HIDDEN) XX(REDRAW) XX(RELOAD) \ XX(TOGGLE_FULL) XX(REVERSE_SORT) XX(SHOW_HIDDEN) XX(REDRAW) XX(RELOAD) \
XX(INPUT_ABORT) XX(INPUT_CONFIRM) XX(INPUT_B_DELETE) XX(INPUT_ABORT) XX(INPUT_CONFIRM) XX(INPUT_B_DELETE)
@ -1000,6 +1000,8 @@ fun absolutize (const string &abs_base, const string &path) -> string {
return abs_base + "/" + path; return abs_base + "/" + path;
} }
/// If `path` is equal to the `current` directory, or lies underneath it,
/// return it as a relative path
fun relativize (string current, const string &path) -> string { fun relativize (string current, const string &path) -> string {
if (current == path) if (current == path)
return "."; return ".";
@ -1217,6 +1219,9 @@ fun handle (wint_t c) -> bool {
change_dir (to_mb (g.editor_line)); change_dir (to_mb (g.editor_line));
}; };
break; break;
case ACTION_PARENT:
change_dir ("..");
break;
case ACTION_GO_START: case ACTION_GO_START:
change_dir (g.start_dir); change_dir (g.start_dir);
break; break;