Skip to content

Commit

Permalink
set shorter sub command alias && update README.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
xwjdsh committed Oct 9, 2017
1 parent 7dfca12 commit c476707
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 9 deletions.
35 changes: 33 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,53 @@

[![Build Status](https://travis-ci.org/xwjdsh/manssh.svg?branch=master)](https://travis-ci.org/xwjdsh/manssh)
[![Go Report Card](https://goreportcard.com/badge/github.com/xwjdsh/manssh)](https://goreportcard.com/report/github.com/xwjdsh/manssh)
[![codebeat badge](https://codebeat.co/badges/38954713-7443-4149-915d-4543da2a5da5)](https://codebeat.co/projects/github-com-xwjdsh-manssh-master)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)



manssh is a command line tool for manage your ssh alias config easily, inspire by [storm](https://github.com/emre/storm) project, power by Go.

Note: only `Host`, `HostName`, `User`, `Port`, `IdentityFile` and `ProxyCommand` is implemented at this point, **other configs and comments will loss**.

![](https://raw.githubusercontent.com/xwjdsh/manssh/master/screenshot/manssh.png)

## Install

#### Go
#### Gopher
```shell
go get github.com/xwjdsh/manssh
```

#### Manual
Download it from [releases](https://github.com/xwjdsh/manssh/releases), and extact it to your `PATH` environment.

## Licence
## Usage
```shell
% manssh
NAME:
manssh - Manage your ssh alias configs easily

USAGE:
manssh [global options] command [command options] [arguments...]

VERSION:
0.1

COMMANDS:
add, a add a new ssh alias record
list, l list all ssh alias records
update, u update existing ssh alias record
delete, d delete existing ssh alias record
backup, b backup ssh alias config records
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--config value, -c value (default: "/Users/wendell/.ssh/config")
--help, -h show help
--version, -v print the version

```

## Licence
[MIT License](https://github.com/xwjdsh/manssh/blob/master/LICENSE)
10 changes: 5 additions & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ func flags() []cli.Flag {

func commands() []cli.Command {
return []cli.Command{
{Name: "add", Usage: "add a new ssh alias record", Action: add,
{Name: "add", Usage: "add a new ssh alias record", Action: add, Aliases: []string{"a"},
Flags: []cli.Flag{
cli.StringFlag{Name: "file, f"},
cli.StringFlag{Name: "proxy, p"},
},
},
{Name: "list", Usage: "list all ssh alias records", Action: list},
{Name: "list", Usage: "list all ssh alias records", Action: list, Aliases: []string{"l"}},
{
Name: "update", Usage: "update existing ssh alias record", Action: update,
Name: "update", Usage: "update existing ssh alias record", Action: update, Aliases: []string{"u"},
Flags: []cli.Flag{
cli.StringFlag{Name: "user, u"},
cli.StringFlag{Name: "host, H"},
Expand All @@ -42,7 +42,7 @@ func commands() []cli.Command {
cli.StringFlag{Name: "proxy, P"},
},
},
{Name: "delete", Usage: "delete existing ssh alias record", Action: delete},
{Name: "backup", Usage: "backup ssh alias config records", Action: backup},
{Name: "delete", Usage: "delete existing ssh alias record", Action: delete, Aliases: []string{"d"}},
{Name: "backup", Usage: "backup ssh alias config records", Action: backup, Aliases: []string{"b"}},
}
}
4 changes: 2 additions & 2 deletions utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
)

const (
version = "0.0.1"
usage = "management ssh config easier"
version = "0.1"
usage = "Manage your ssh alias configs easily"
)

var (
Expand Down

0 comments on commit c476707

Please # to comment.