Use 'pin' dir instead of 'mark' dir

This commit is contained in:
Arun Prakash Jana 2017-09-01 19:57:36 +05:30
parent c248f42c31
commit e2fae851c3
No known key found for this signature in database
GPG key ID: A75979F35C080412
4 changed files with 10 additions and 10 deletions

View file

@ -82,7 +82,7 @@ Have fun with it! PRs are welcome. Check out [#1](https://github.com/jarun/nnn/i
- Navigation - Navigation
- Familiar shortcuts - Familiar shortcuts
- *Navigate-as-you-type* mode - *Navigate-as-you-type* mode
- Bookmarks support; mark and visit a directory - Bookmarks support; pin and visit a directory
- Jump HOME or to the last visited directory (as usual!) - Jump HOME or to the last visited directory (as usual!)
- Jump to initial dir, chdir prompt, cd ..... (with . as PWD) - Jump to initial dir, chdir prompt, cd ..... (with . as PWD)
- Roll-over at edges, page through entries - Roll-over at edges, page through entries
@ -205,8 +205,8 @@ To cook yourself, download the [latest stable release](https://github.com/jarun/
^/ | Open desktop search tool ^/ | Open desktop search tool
. | Toggle hide .dot files . | Toggle hide .dot files
b | Show bookmark prompt b | Show bookmark prompt
^B | Mark current dir ^B | Pin current dir
^V | Go to marked dir ^V | Go to pinned dir
c | Show change dir prompt c | Show change dir prompt
d | Toggle detail view d | Toggle detail view
D | Show current file details D | Show current file details

View file

@ -21,7 +21,7 @@ enum action {
SEL_CDBEGIN, SEL_CDBEGIN,
SEL_CDLAST, SEL_CDLAST,
SEL_CDBM, SEL_CDBM,
SEL_MARK, SEL_PIN,
SEL_VISIT, SEL_VISIT,
SEL_TOGGLEDOT, SEL_TOGGLEDOT,
SEL_DETAIL, SEL_DETAIL,
@ -115,7 +115,7 @@ static struct key bindings[] = {
/* Change dir using bookmark */ /* Change dir using bookmark */
{ 'b', SEL_CDBM, "", "" }, { 'b', SEL_CDBM, "", "" },
/* Mark a path to visit later */ /* Mark a path to visit later */
{ CONTROL('B'), SEL_MARK, "", "" }, { CONTROL('B'), SEL_PIN, "", "" },
/* Visit marked directory */ /* Visit marked directory */
{ CONTROL('V'), SEL_VISIT, "", "" }, { CONTROL('V'), SEL_VISIT, "", "" },
/* Toggle hide .dot files */ /* Toggle hide .dot files */

4
nnn.1
View file

@ -62,9 +62,9 @@ Toggle hide .dot files
.It Ic b .It Ic b
Show bookmark key prompt Show bookmark key prompt
.It Ic ^B .It Ic ^B
Mark current dir Pin current dir
.It Ic ^V .It Ic ^V
Visit marked dir Visit pinned dir
.It Ic c .It Ic c
Show change dir prompt Show change dir prompt
.It Ic d .It Ic d

6
nnn.c
View file

@ -1645,8 +1645,8 @@ show_help(char *path)
"d^/ | Open desktop search tool\n" "d^/ | Open desktop search tool\n"
"e. | Toggle hide .dot files\n" "e. | Toggle hide .dot files\n"
"eb | Show bookmark prompt\n" "eb | Show bookmark prompt\n"
"d^B | Mark current dir\n" "d^B | Pin current dir\n"
"d^V | Go to marked dir\n" "d^V | Go to pinned dir\n"
"ec | Show change dir prompt\n" "ec | Show change dir prompt\n"
"ed | Toggle detail view\n" "ed | Toggle detail view\n"
"eD | Show current file details\n" "eD | Show current file details\n"
@ -2505,7 +2505,7 @@ nochange:
if (cfg.filtermode) if (cfg.filtermode)
presel = FILTER; presel = FILTER;
goto begin; goto begin;
case SEL_MARK: case SEL_PIN:
xstrlcpy(mark, path, PATH_MAX); xstrlcpy(mark, path, PATH_MAX);
printmsg(mark); printmsg(mark);
goto nochange; goto nochange;