Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nccf
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
702
Provoz
nccf
Commits
06cab8cc
Commit
06cab8cc
authored
15 years ago
by
Yorhel
Browse files
Options
Downloads
Patches
Plain Diff
Added some keybindings and changed 'h' to 'e' in browser
parent
adaf8a60
No related branches found
No related tags found
No related merge requests found
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
ChangeLog
+1
-0
1 addition, 0 deletions
ChangeLog
doc/ncdu.1
+4
-4
4 additions, 4 deletions
doc/ncdu.1
src/browser.c
+6
-1
6 additions, 1 deletion
src/browser.c
src/delete.c
+4
-0
4 additions, 0 deletions
src/delete.c
src/help.c
+10
-5
10 additions, 5 deletions
src/help.c
with
25 additions
and
10 deletions
ChangeLog
+
1
−
0
View file @
06cab8cc
...
@@ -8,6 +8,7 @@ git - ?
...
@@ -8,6 +8,7 @@ git - ?
- Properly display MiB units instead of MB (IEEE 1541 - bug #2831412)
- Properly display MiB units instead of MB (IEEE 1541 - bug #2831412)
- Link to ncursesw when available
- Link to ncursesw when available
- Improved support for non-ASCII characters
- Improved support for non-ASCII characters
- VIM keybindings for browsing through the tree (#2788249, #1880622)
1.5 - 2009-05-02
1.5 - 2009-05-02
- Fixed incorrect apparent size on directory refresh
- Fixed incorrect apparent size on directory refresh
...
...
This diff is collapsed.
Click to expand it.
doc/ncdu.1
+
4
−
4
View file @
06cab8cc
...
@@ -43,13 +43,13 @@ should be seperated by a newline.
...
@@ -43,13 +43,13 @@ should be seperated by a newline.
\fB?\fP
\fB?\fP
Show help + keys + about screen
Show help + keys + about screen
.TP
.TP
\fBup
/
down\fP
\fBup
,
down
j, k
\fP
Cycle through the items
Cycle through the items
.TP
.TP
\fBright
/
enter\fP
\fBright
,
enter
, l
\fP
Open selected directory
Open selected directory
.TP
.TP
\fBleft\fP
\fBleft
, <, h
\fP
Go to parent directory
Go to parent directory
.TP
.TP
\fBn\fP
\fBn\fP
...
@@ -74,7 +74,7 @@ Toggle between showing percentage, graph, both, or none. Percentage
...
@@ -74,7 +74,7 @@ Toggle between showing percentage, graph, both, or none. Percentage
is relative to the size of the current directory, graph is relative
is relative to the size of the current directory, graph is relative
to the largest item in the current directory.
to the largest item in the current directory.
.TP
.TP
\fB
h
\fP
\fB
e
\fP
Show/hide 'hidden' or 'excluded' files and directories. Please note that
Show/hide 'hidden' or 'excluded' files and directories. Please note that
even though you can't see the hidden files and directories, they are still
even though you can't see the hidden files and directories, they are still
there and they are still included in the directory sizes. If you suspect
there and they are still included in the directory sizes. If you suspect
...
...
This diff is collapsed.
Click to expand it.
src/browser.c
+
6
−
1
View file @
06cab8cc
...
@@ -347,9 +347,11 @@ int browse_key(int ch) {
...
@@ -347,9 +347,11 @@ int browse_key(int ch) {
switch
(
ch
)
{
switch
(
ch
)
{
/* selecting items */
/* selecting items */
case
KEY_UP
:
case
KEY_UP
:
case
'k'
:
browse_key_sel
(
-
1
);
browse_key_sel
(
-
1
);
break
;
break
;
case
KEY_DOWN
:
case
KEY_DOWN
:
case
'j'
:
browse_key_sel
(
1
);
browse_key_sel
(
1
);
break
;
break
;
case
KEY_HOME
:
case
KEY_HOME
:
...
@@ -383,7 +385,7 @@ int browse_key(int ch) {
...
@@ -383,7 +385,7 @@ int browse_key(int ch) {
sort
++
;
sort
++
;
nonfo
++
;
nonfo
++
;
break
;
break
;
case
'
h
'
:
case
'
e
'
:
toggle
(
flags
,
BF_HIDE
);
toggle
(
flags
,
BF_HIDE
);
browse_key_sel
(
0
);
browse_key_sel
(
0
);
nonfo
++
;
nonfo
++
;
...
@@ -401,6 +403,7 @@ int browse_key(int ch) {
...
@@ -401,6 +403,7 @@ int browse_key(int ch) {
/* browsing */
/* browsing */
case
10
:
case
10
:
case
KEY_RIGHT
:
case
KEY_RIGHT
:
case
'l'
:
for
(
n
=
browse_dir
;
n
!=
NULL
;
n
=
n
->
next
)
for
(
n
=
browse_dir
;
n
!=
NULL
;
n
=
n
->
next
)
if
(
n
->
flags
&
FF_BSEL
)
if
(
n
->
flags
&
FF_BSEL
)
break
;
break
;
...
@@ -416,6 +419,8 @@ int browse_key(int ch) {
...
@@ -416,6 +419,8 @@ int browse_key(int ch) {
nonfo
++
;
nonfo
++
;
break
;
break
;
case
KEY_LEFT
:
case
KEY_LEFT
:
case
'h'
:
case
'<'
:
if
(
browse_dir
!=
NULL
&&
browse_dir
->
parent
->
parent
!=
NULL
)
{
if
(
browse_dir
!=
NULL
&&
browse_dir
->
parent
->
parent
!=
NULL
)
{
browse_dir
=
browse_dir
->
parent
->
parent
->
sub
;
browse_dir
=
browse_dir
->
parent
->
parent
->
sub
;
sort
++
;
sort
++
;
...
...
This diff is collapsed.
Click to expand it.
src/delete.c
+
4
−
0
View file @
06cab8cc
...
@@ -112,10 +112,12 @@ int delete_key(int ch) {
...
@@ -112,10 +112,12 @@ int delete_key(int ch) {
if
(
state
==
DS_CONFIRM
)
if
(
state
==
DS_CONFIRM
)
switch
(
ch
)
{
switch
(
ch
)
{
case
KEY_LEFT
:
case
KEY_LEFT
:
case
'h'
:
if
(
--
seloption
<
0
)
if
(
--
seloption
<
0
)
seloption
=
0
;
seloption
=
0
;
break
;
break
;
case
KEY_RIGHT
:
case
KEY_RIGHT
:
case
'l'
:
if
(
++
seloption
>
2
)
if
(
++
seloption
>
2
)
seloption
=
2
;
seloption
=
2
;
break
;
break
;
...
@@ -139,10 +141,12 @@ int delete_key(int ch) {
...
@@ -139,10 +141,12 @@ int delete_key(int ch) {
else
if
(
state
==
DS_FAILED
)
else
if
(
state
==
DS_FAILED
)
switch
(
ch
)
{
switch
(
ch
)
{
case
KEY_LEFT
:
case
KEY_LEFT
:
case
'h'
:
if
(
--
seloption
<
0
)
if
(
--
seloption
<
0
)
seloption
=
0
;
seloption
=
0
;
break
;
break
;
case
KEY_RIGHT
:
case
KEY_RIGHT
:
case
'l'
:
if
(
++
seloption
>
2
)
if
(
++
seloption
>
2
)
seloption
=
2
;
seloption
=
2
;
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
src/help.c
+
10
−
5
View file @
06cab8cc
...
@@ -32,19 +32,20 @@
...
@@ -32,19 +32,20 @@
int
page
,
start
;
int
page
,
start
;
#define KEYS 1
3
#define KEYS 1
4
char
*
keys
[
KEYS
*
2
]
=
{
char
*
keys
[
KEYS
*
2
]
=
{
/*|----key----| |----------------description----------------|*/
/*|----key----| |----------------description----------------|*/
"up/down"
,
"Cycle through the items"
,
"up, k"
,
"Move cursor up"
,
"right/enter"
,
"Open directory"
,
"down, j"
,
"Move cursor down"
,
"left"
,
"Previous directory"
,
"right/enter"
,
"Open selected directory"
,
"left, <, h"
,
"Open parent directory"
,
"n"
,
"Sort by name (ascending/descending)"
,
"n"
,
"Sort by name (ascending/descending)"
,
"s"
,
"Sort by size (ascending/descending)"
,
"s"
,
"Sort by size (ascending/descending)"
,
"d"
,
"Delete selected file or directory"
,
"d"
,
"Delete selected file or directory"
,
"t"
,
"Toggle dirs before files when sorting"
,
"t"
,
"Toggle dirs before files when sorting"
,
"g"
,
"Show percentage and/or graph"
,
"g"
,
"Show percentage and/or graph"
,
"a"
,
"Toggle between apparent size and disk usage"
,
"a"
,
"Toggle between apparent size and disk usage"
,
"
h
"
,
"Show/hide hidden or excluded files"
,
"
e
"
,
"Show/hide hidden or excluded files"
,
"i"
,
"Show information about selected item"
,
"i"
,
"Show information about selected item"
,
"r"
,
"Recalculate the current directory"
,
"r"
,
"Recalculate the current directory"
,
"q"
,
"Quit ncdu"
"q"
,
"Quit ncdu"
...
@@ -166,22 +167,26 @@ int help_key(int ch) {
...
@@ -166,22 +167,26 @@ int help_key(int ch) {
break
;
break
;
case
KEY_RIGHT
:
case
KEY_RIGHT
:
case
KEY_NPAGE
:
case
KEY_NPAGE
:
case
'l'
:
if
(
++
page
>
3
)
if
(
++
page
>
3
)
page
=
3
;
page
=
3
;
start
=
0
;
start
=
0
;
break
;
break
;
case
KEY_LEFT
:
case
KEY_LEFT
:
case
KEY_PPAGE
:
case
KEY_PPAGE
:
case
'h'
:
if
(
--
page
<
1
)
if
(
--
page
<
1
)
page
=
1
;
page
=
1
;
start
=
0
;
start
=
0
;
break
;
break
;
case
KEY_DOWN
:
case
KEY_DOWN
:
case
' '
:
case
' '
:
case
'j'
:
if
(
start
<
KEYS
-
10
)
if
(
start
<
KEYS
-
10
)
start
++
;
start
++
;
break
;
break
;
case
KEY_UP
:
case
KEY_UP
:
case
'k'
:
if
(
start
>
0
)
if
(
start
>
0
)
start
--
;
start
--
;
break
;
break
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment