Skip to content

Commit c0f9f38

Browse files
committed
Remove -h option; we have a man page now.
1 parent ed1c30f commit c0f9f38

File tree

3 files changed

+5
-53
lines changed

3 files changed

+5
-53
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ file.
3131
Exit with <kbd>q</kbd>, or exit and pass the currently selected commit to
3232
`git show` with <kbd>s</kbd>.
3333

34-
Run `git browse -h` to see a full list of commands.
34+
Run `git browse --help` or `man git-browse` to see the full documentation.
3535

3636
## Features
3737

bin/git-browse

Lines changed: 3 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -11,52 +11,9 @@ from gitbrowse.browser import GitBrowser
1111
from gitbrowse import git
1212

1313

14-
parser = argparse.ArgumentParser(
15-
description=textwrap.dedent('''\
16-
Browse the Git history of a single file. Similar to
17-
git blame, but interactive.
18-
'''),
19-
formatter_class=argparse.RawDescriptionHelpFormatter,
20-
epilog=textwrap.dedent('''\
21-
You can use the following key commands to move around the
22-
interactive blame output. If you use less they should be
23-
somewhat familiar:
24-
25-
NAVIGATING AROUND THE FILE:
26-
j e RETURN DOWN move down one line
27-
k y UP move up one line
28-
f z SPACE PAGE-DOWN move down one screen
29-
b w PAGE-UP move up one screen
30-
d move down half a screen
31-
u move up half a screen
32-
G > END move to the bottom of the file
33-
g < HOME move to the top of the file
34-
35-
NAVIGATING GIT HISTORY:
36-
[ move to the previous commit
37-
] move to the next commit
38-
39-
SEARCH:
40-
/ search forwards through file
41-
? search backwards through file
42-
n go to next match
43-
N go to previous match
44-
45-
QUITTING:
46-
q Q quit
47-
s quit, and run `git show`
48-
49-
NOTES:
50-
- Most of the commands above can be prefixed with a
51-
number, e.g. 3j will move down three lines.
52-
- Entering a number and hitting return will jump to
53-
that line, e.g. 10<RETURN> will jump to line 10.
54-
'''),
55-
)
56-
parser.add_argument('rev', nargs='?', default='HEAD',
57-
help='a Git revision to start from (defaults to HEAD)')
58-
parser.add_argument('file',
59-
help='the path to the file you want to examine')
14+
parser = argparse.ArgumentParser(add_help=False)
15+
parser.add_argument('rev', nargs='?', default='HEAD')
16+
parser.add_argument('file')
6017
args = parser.parse_args()
6118

6219
if not git.verify_revision(args.rev):

man/man1/git-browse.1

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
.nf
1010
git-browse \- Interactively browse a file's Git history
1111
.SH "SYNOPSIS"
12-
\fIgit browse\fR [-h] [<commit>] <path>
12+
\fIgit browse\fR [<commit>] <path>
1313
.fi
1414
.sp
1515
.SH "DESCRIPTION"
@@ -19,11 +19,6 @@ Browse the Git history of a single file. \fIgit-browse\fR is similar to \fBgit-b
1919
The commands for navigating around the file are based on \fBless\fR(1) and should therefore be familiar to most command line users. However, since only a subset of the \fBless\fR commands are currently supported and there are additional commands to move forwards and back through history it's worth glancing though the commands section below.
2020
.SH "OPTIONS"
2121
.PP
22-
\-h
23-
.RS 4
24-
Display a brief help message.
25-
.RE
26-
.PP
2722
<commit>
2823
.RS 4
2924
The commit to start from. Defaults to HEAD.

0 commit comments

Comments
 (0)