mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 13:51:31 +00:00
Minor improvements
- reduce 4 spaces between help columns as it's too wide for handhelds - support `]` as prompt in nav-as-you-type-mode when filter is empty - update plugin docs
This commit is contained in:
parent
fb2c548e86
commit
6b5bb16b46
|
@ -87,7 +87,7 @@ For example:
|
||||||
|
|
||||||
Now <kbd>;x</kbd> can be used to make a file executable, <kbd>;g</kbd> can be used to the git log of a git project directory, <kbd>;s</kbd> can be used to preview a partially downloaded media file.
|
Now <kbd>;x</kbd> can be used to make a file executable, <kbd>;g</kbd> can be used to the git log of a git project directory, <kbd>;s</kbd> can be used to preview a partially downloaded media file.
|
||||||
|
|
||||||
`nnn` waits for user confirmation when it executes a command as plugin (unline plugins which can add a `read` to wait). If you do not need to wait for user confirmation after the command has executed, add a `*` after the command. For example:
|
`nnn` waits for user confirmation (the prompt `Press Enter to continue`) when it executes a command as plugin (unline plugins which can add a `read` to wait). If you do not need to wait for user confirmation after the command has executed, add a `*` after the command. For example:
|
||||||
|
|
||||||
export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn*;o:fzopen'
|
export NNN_PLUG='x:_chmod +x $nnn;g:_git log;s:_smplayer $nnn*;o:fzopen'
|
||||||
|
|
||||||
|
|
57
src/nnn.c
57
src/nnn.c
|
@ -2070,6 +2070,7 @@ static int filterentries(char *path)
|
||||||
|
|
||||||
switch (*ch) {
|
switch (*ch) {
|
||||||
case '=': // fallthrough /* Launch app */
|
case '=': // fallthrough /* Launch app */
|
||||||
|
case ']': // fallthorugh /*Prompt key */
|
||||||
case ';': // fallthrough /* Run plugin key */
|
case ';': // fallthrough /* Run plugin key */
|
||||||
case '?': /* Help and config key, '?' is an invalid regex */
|
case '?': /* Help and config key, '?' is an invalid regex */
|
||||||
if (len == 1) {
|
if (len == 1) {
|
||||||
|
@ -3463,39 +3464,39 @@ static void show_help(const char *path)
|
||||||
const char helpstr[] = {
|
const char helpstr[] = {
|
||||||
"0\n"
|
"0\n"
|
||||||
"1NAVIGATION\n"
|
"1NAVIGATION\n"
|
||||||
"9Up k Up%-20cPgUp ^U Scroll up\n"
|
"9Up k Up%-16cPgUp ^U Scroll up\n"
|
||||||
"7Down j Down%-18cPgDn ^D Scroll down\n"
|
"7Down j Down%-14cPgDn ^D Scroll down\n"
|
||||||
"7Left h Parent%-16c~ ` @ - HOME, /, start, last\n"
|
"7Left h Parent%-12c~ ` @ - HOME, /, start, last\n"
|
||||||
"9g ^A Top%-15cRet Right l Open\n"
|
"9g ^A Top%-11cRet Right l Open\n"
|
||||||
"9G ^E Bottom%-22c' First file\n"
|
"9G ^E Bottom%-18c' First file\n"
|
||||||
"cb Pin CWD%-20c^B Go to pinned dir\n"
|
"cb Pin CWD%-16c^B Go to pinned dir\n"
|
||||||
"8c, ^/ Lead key%-14cN LeadN Context N\n"
|
"8c, ^/ Lead key%-10cN LeadN Context N\n"
|
||||||
"6(Sh)Tab Cycle context%-15cd Detail view toggle\n"
|
"6(Sh)Tab Cycle context%-11cd Detail view toggle\n"
|
||||||
"c/ Filter%-17cIns ^N Nav-as-you-type toggle\n"
|
"c/ Filter%-13cIns ^N Nav-as-you-type toggle\n"
|
||||||
"aEsc Exit prompt%-13c^L F5 Redraw/clear prompt\n"
|
"aEsc Exit prompt%-9c^L F5 Redraw/clear prompt\n"
|
||||||
"c. Show/hide dots%-14c? Help, conf\n"
|
"c. Show/hide dots%-10c? Help, conf\n"
|
||||||
"9Q ^Q Quit%-24cq Quit context\n"
|
"9Q ^Q Quit%-20cq Quit context\n"
|
||||||
"b^G QuitCD%-1c\n"
|
"b^G QuitCD%-1c\n"
|
||||||
"1FILES\n"
|
"1FILES\n"
|
||||||
"b^O Open with...%-16cn Create new/link\n"
|
"b^O Open with...%-12cn Create new/link\n"
|
||||||
"cD File details%-12c^R F2 Rename/duplicate\n"
|
"cD File details%-8c^R F2 Rename/duplicate\n"
|
||||||
"3Space ^J/a Sel toggle/all%-14cr Batch rename\n"
|
"3Space ^J/a Sel toggle/all%-10cr Batch rename\n"
|
||||||
"9m ^K Sel range, clear%-12cM List sel\n"
|
"9m ^K Sel range, clear%-8cM List sel\n"
|
||||||
"cP Copy sel here%-15cK Edit sel\n"
|
"cP Copy sel here%-11cK Edit sel\n"
|
||||||
"cV Move sel here%-15cw Copy/move sel as\n"
|
"cV Move sel here%-11cw Copy/move sel as\n"
|
||||||
"cX Delete sel%-17c^X Delete entry\n"
|
"cX Delete sel%-13c^X Delete entry\n"
|
||||||
"cf Archive%-18co ^F Archive ops\n"
|
"cf Archive%-14co ^F Archive ops\n"
|
||||||
"ce Edit in EDITOR%-14cp Open in PAGER\n"
|
"ce Edit in EDITOR%-10cp Open in PAGER\n"
|
||||||
"1ORDER TOGGLES\n"
|
"1ORDER TOGGLES\n"
|
||||||
"cA Apparent du%-17cS du\n"
|
"cA Apparent du%-13cS du\n"
|
||||||
"cz Size%-24ct Time\n"
|
"cz Size%-20ct Time\n"
|
||||||
"cE Extension%-1c\n"
|
"cE Extension%-1c\n"
|
||||||
"1MISC\n"
|
"1MISC\n"
|
||||||
"9! ^] Shell%-21c; x Plugin key\n"
|
"9! ^] Shell%-17c; x Plugin key\n"
|
||||||
"cC Execute file%-13ci ^V Pick plugin\n"
|
"cC Execute file%-9ci ^V Pick plugin\n"
|
||||||
"cs Manage session%-14c= Launch app\n"
|
"cs Manage session%-10c= Launch app\n"
|
||||||
"cc Connect remote%-14cu Unmount\n"
|
"cc Connect remote%-10cu Unmount\n"
|
||||||
"9] ^P Prompt%-22cL Lock\n"
|
"9] ^P Prompt%-18cL Lock\n"
|
||||||
};
|
};
|
||||||
|
|
||||||
fd = create_tmp_file();
|
fd = create_tmp_file();
|
||||||
|
|
Loading…
Reference in a new issue