Skip to content

Commit

Permalink
fix version and readme
Browse files Browse the repository at this point in the history
  • Loading branch information
at-grandpa committed Jan 1, 2018
1 parent 81a696b commit 65fe03e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
31 changes: 17 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
- [x] Required flag for options
- [x] Nested sub commands
- [x] `--help` option
- [x] Command name alias


## Installation
Expand All @@ -31,7 +32,7 @@ Add this to your application's `shard.yml`:
dependencies:
clim:
github: at-grandpa/clim
version: 0.1.4
version: 0.1.5
```
## Sample Code (main command)
Expand Down Expand Up @@ -109,13 +110,15 @@ module FakeGit
# Following is difinition of command.
#
command "branch"
alias_name "b", "br"
desc "List, create, or delete branches."
usage "fgit branch [arguments]"
run do |opts, args|
puts "Fake Git branch!!"
end
command "log"
alias_name "l"
desc "Show commit logs."
usage "fgit log [arguments]"
run do |opts, args|
Expand Down Expand Up @@ -153,7 +156,7 @@ FakeGit::Cli.start(ARGV)
```

```
$ crystal build -o ./fgit src/fake_git.cr
$ crystal build -o ./fgit src/fake-git.cr
$ ./fgit
Fake Git command.
Expand All @@ -168,11 +171,10 @@ $ ./fgit
Sub Commands:
branch List, create, or delete branches.
log Show commit logs.
branch, b, br List, create, or delete branches.
log, l Show commit logs.
$ ./fgit branch --help
$ ./fgit br --help
List, create, or delete branches.
Expand All @@ -184,8 +186,7 @@ $ ./fgit branch --help
--help Show this help.
$ ./fgit log --help
$ ./fgit l --help
Show commit logs.
Expand All @@ -202,8 +203,7 @@ $ ./fgit log --help
short Show commit short logs.
long Show commit long logs.
$ ./fgit log short --help
$ ./fgit l short --help
Show commit short logs.
Expand All @@ -215,12 +215,10 @@ $ ./fgit log short --help
--help Show this help.
$ ./fgit log short
Fake Git short log!!
```


## Usage

### require
Expand All @@ -231,6 +229,12 @@ require "clim"

### Command Informations

#### alias_name

```crystal
alias_name "alias1", "alias2", "alias3" # Command name alias.
```

#### desc

```crystal
Expand Down Expand Up @@ -282,7 +286,7 @@ require "clim"

You can specify short name, long name or both.

see: [https://crystal-lang.org/api/0.23.0/OptionParser.html](https://crystal-lang.org/api/0.23.0/OptionParser.html)
see: [https://crystal-lang.org/api/OptionParser.html](https://crystal-lang.org/api/OptionParser.html)

#### Short name only

Expand Down Expand Up @@ -323,7 +327,6 @@ If both are specified, the long name becomes the key.
end
```


### default / required

```crystal
Expand Down
4 changes: 2 additions & 2 deletions shard.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: clim
version: 0.1.4
version: 0.1.5

authors:
- at-grandpa <@at_grandpa>
Expand All @@ -8,6 +8,6 @@ targets:
clim:
main: src/clim.cr

crystal: 0.23.0
crystal: 0.24.1

license: MIT
2 changes: 1 addition & 1 deletion src/clim/version.cr
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
class Clim
VERSION = "0.1.4"
VERSION = "0.1.5"
end

0 comments on commit 65fe03e

Please sign in to comment.