add "rm" alias for "git hawser remove"

This commit is contained in:
Rick Olson 2015-02-02 09:06:42 -07:00
parent 609d405686
commit abc00661f0
4 changed files with 13 additions and 6 deletions

@ -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> [path]*")
Print("git hawser path rm <path> [path]*")
return
}
@ -62,5 +68,6 @@ func removeCommand(cmd *cobra.Command, args []string) {
}
func init() {
RootCmd.AddCommand(rmCmd)
RootCmd.AddCommand(removeCmd)
}

@ -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.

@ -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.

@ -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