Closed Parth closed 8 years ago
Please adjust your editor settings to keep the current formatting.
Oh, sorry about that, will fix
@Leandros should be fixed now
Great. Looks good. One tiny improvement and it's ready for the merge. It's better to use argv[0]
instead of hardcoding the tldr
command, the executable could be named different.
Good idea, should be fixed now. @Leandros
You missed the tldr
two lines below. ;)
I would also rather return EXIT_SUCCESS
, since it's not exactly a failure.
Got it! And I checked a few commands and it seems that this type of situation is indeed considered "failure"
➜ src git:(master) git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
➜ src git:(master) echo $?
0
➜ src git:(master) git
usage: git [--version] [--help] [-C <path>] [-c name=value]
[--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
[-p | --paginate | --no-pager] [--no-replace-objects] [--bare]
[--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
<command> [<args>]
The most commonly used git commands are:
add Add file contents to the index
bisect Find by binary search the change that introduced a bug
branch List, create, or delete branches
checkout Switch branches or restore working tree files
clone Clone a repository into a new directory
commit Record changes to the repository
diff Show changes between commits, commit and working tree, etc
fetch Download objects and refs from another repository
grep Print lines matching a pattern
init Create an empty Git repository or reinitialize an existing one
log Show commit logs
merge Join two or more development histories together
mv Move or rename a file, a directory, or a symlink
pull Fetch from and integrate with another repository or a local branch
push Update remote refs along with associated objects
rebase Forward-port local commits to the updated upstream head
reset Reset current HEAD to the specified state
rm Remove files from the working tree and from the index
show Show various types of objects
status Show the working tree status
tag Create, list, delete or verify a tag object signed with GPG
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
➜ src git:(master) echo $?
1
➜ src git:(master)
I can cite other examples if you'd like
@Leandros
Please merge the current master thread into your branch, it'll run the travis build. And you should notice the bug in your code, since it won't compile.
Is it all good now?
Yes. Build passed. Looks good! Merged!
Thanks! :+1:
Added the following error if no args are passed in:
And the following message if the wrong args are passed in:
fixes #7 #8
Let me know what you guys think :smile: