From abc00661f0fbcb017d7d32d4bc3ea74784f59017 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Mon, 2 Feb 2015 09:06:42 -0700 Subject: [PATCH] add "rm" alias for "git hawser remove" --- commands/{command_remove.go => command_rm.go} | 9 ++++++++- docs/man/git-hawser-add.1.ronn | 2 +- docs/man/git-hawser-path.1.ronn | 2 +- .../{git-hawser-remove.1.ronn => git-hawser-rm.1.ronn} | 6 +++--- 4 files changed, 13 insertions(+), 6 deletions(-) rename commands/{command_remove.go => command_rm.go} (85%) rename docs/man/{git-hawser-remove.1.ronn => git-hawser-rm.1.ronn} (79%) diff --git a/commands/command_remove.go b/commands/command_rm.go similarity index 85% rename from commands/command_remove.go rename to commands/command_rm.go index 0e110d50..b5b103c1 100644 --- a/commands/command_remove.go +++ b/commands/command_rm.go @@ -15,13 +15,19 @@ var ( Short: "Remove an entry from .gitattributes", Run: removeCommand, } + + rmCmd = &cobra.Command{ + Use: "rm", + Short: "Remove an entry from .gitattributes", + Run: removeCommand, + } ) func removeCommand(cmd *cobra.Command, args []string) { hawser.InstallHooks(false) if len(args) < 1 { - Print("git hawser path remove [path]*") + Print("git hawser path rm [path]*") return } @@ -62,5 +68,6 @@ func removeCommand(cmd *cobra.Command, args []string) { } func init() { + RootCmd.AddCommand(rmCmd) RootCmd.AddCommand(removeCmd) } diff --git a/docs/man/git-hawser-add.1.ronn b/docs/man/git-hawser-add.1.ronn index a8783683..8eae0dfb 100644 --- a/docs/man/git-hawser-add.1.ronn +++ b/docs/man/git-hawser-add.1.ronn @@ -19,6 +19,6 @@ path. ## SEE ALSO -git-hawser-remove(1), git-hawser-path(1), git-hawser-init(1), gitattributes(5). +git-hawser-rm(1), git-hawser-path(1), git-hawser-init(1), gitattributes(5). Part of the git-hawser(1) suite. diff --git a/docs/man/git-hawser-path.1.ronn b/docs/man/git-hawser-path.1.ronn index 5d30ce2c..0cdb6a6d 100644 --- a/docs/man/git-hawser-path.1.ronn +++ b/docs/man/git-hawser-path.1.ronn @@ -19,6 +19,6 @@ path. ## SEE ALSO -git-hawser-add(1), git-hawser-remove(1), git-hawser-init(1), gitattributes(5). +git-hawser-add(1), git-hawser-rm(1), git-hawser-init(1), gitattributes(5). Part of the git-hawser(1) suite. diff --git a/docs/man/git-hawser-remove.1.ronn b/docs/man/git-hawser-rm.1.ronn similarity index 79% rename from docs/man/git-hawser-remove.1.ronn rename to docs/man/git-hawser-rm.1.ronn index 04db3e31..190ec755 100644 --- a/docs/man/git-hawser-remove.1.ronn +++ b/docs/man/git-hawser-rm.1.ronn @@ -1,9 +1,9 @@ -git-hawser-remove(1) - Remove Hawser paths from Git Attributes. +git-hawser-rm(1) - Remove Hawser paths from Git Attributes. ====================================================================== ## SYNOPSIS -`git hawser remove` [path]* +`git hawser rm` [path]* ## DESCRIPTION @@ -15,7 +15,7 @@ path. * Prevent a path from using Hawser clean and smudge filters. - `git hawser remove *.gif` + `git hawser rm *.gif` ## SEE ALSO