add some additional short aliases for got commands
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
diff --git a/got/got.1 b/got/got.1
index 93a219c..bff1043 100644
--- a/got/got.1
+++ b/got/got.1
@@ -74,6 +74,9 @@ command must be used to populate the empty repository before
.Cm got checkout
can be used.
.Pp
+.It Cm in
+Short alias for
+.Cm init .
.It Cm import [ Fl b Ar branch ] [ Fl m Ar message ] [ Fl r Ar repository-path ] [ Fl I Ar pattern ] directory
Create an initial commit in a repository from the file hierarchy
within the specified
@@ -122,6 +125,9 @@ The
follows the globbing rules documented in
.Xr glob 7 .
.El
+.It Cm im
+Short alias for
+.Cm import .
.It Cm checkout [ Fl b Ar branch ] [ Fl c Ar commit ] [ Fl p Ar path-prefix ] repository-path [ work-tree-path ]
Copy files from a repository into a new work tree.
If the
@@ -339,6 +345,9 @@ This option is only valid when
.Cm got diff
is invoked in a work tree.
.El
+.It Cm di
+Short alias for
+.Cm diff .
.It Cm blame [ Fl c Ar commit ] [ Fl r Ar repository-path ] Ar path
Display line-by-line history of a file at the specified path.
.Pp
@@ -361,6 +370,9 @@ If this directory is a
.Nm
work tree, use the repository path associated with this work tree.
.El
+.It Cm bl
+Short alias for
+.Cm blame .
.It Cm tree [ Fl c Ar commit ] [ Fl r Ar repository-path ] [ Fl i ] [ Fl R] [ Ar path ]
Display a listing of files and directories at the specified
directory path in the repository.
@@ -400,6 +412,9 @@ Show object IDs of files (blob objects) and directories (tree objects).
.It Fl R
Recurse into sub-directories in the repository.
.El
+.It Cm tr
+Short alias for
+.Cm tree .
.It Cm ref [ Fl r Ar repository-path ] [ Fl l ] [ Fl d Ar name ] [ Ar name Ar target ]
Manage references in a repository.
.Pp
diff --git a/got/got.c b/got/got.c
index 18df91b..e415b9e 100644
--- a/got/got.c
+++ b/got/got.c
@@ -121,14 +121,14 @@ static const struct got_error* cmd_stage(int, char *[]);
static const struct got_error* cmd_unstage(int, char *[]);
static struct got_cmd got_commands[] = {
- { "init", cmd_init, usage_init, "" },
- { "import", cmd_import, usage_import, "" },
+ { "init", cmd_init, usage_init, "in" },
+ { "import", cmd_import, usage_import, "im" },
{ "checkout", cmd_checkout, usage_checkout, "co" },
{ "update", cmd_update, usage_update, "up" },
{ "log", cmd_log, usage_log, "" },
- { "diff", cmd_diff, usage_diff, "" },
- { "blame", cmd_blame, usage_blame, "" },
- { "tree", cmd_tree, usage_tree, "" },
+ { "diff", cmd_diff, usage_diff, "di" },
+ { "blame", cmd_blame, usage_blame, "bl" },
+ { "tree", cmd_tree, usage_tree, "tr" },
{ "status", cmd_status, usage_status, "st" },
{ "ref", cmd_ref, usage_ref, "" },
{ "branch", cmd_branch, usage_branch, "br" },