-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show installed packages too #2
Conversation
Hi. Thanks for this PR. I'm on the fence on including this extra output. On one hand, my idea of what I'm going to think a bit more on it. Sorry for the delay. |
I would've like to use bash's getopt to more easily parse -i or something, but didn't want to break your scripts current assumption of a basic posix shell. For what I want, I can use an alias or wrapper script to always apply the environment variable. (Or I can just keep my own version of wat ;-) |
Thanks for taking a swing at this, and honoring my shebang choice. I do think an option would be better, but it shouldn't need Also, I would want to add a test for this before merging. |
Understood, will head that route
|
Heh, cram is a neat little tool. :-) Implemented command line arguments and matching tests. |
@@ -0,0 +1,335 @@ | |||
$ run_it() { PACMAN_LOG="$TESTDIR"/pacman.log "$TESTDIR"/../wat "$@"; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks very much for adding a comprehensive test (two in fact!) but I think it's a bit redundant and could therefore turn into a maintenance burden. I think it would be OK/better to just add a single additional case to the existing test that runs with -i
and confirms the installed stuff appears. No need to re-create all of the existing cases with -i
and --installed
.
If you don't want to go through the textual-hassle just say so and I'd be happy to do it myself after merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alrighty: I wasn't sure how extensive or not it ought to be. I've very rarely ever dealt with automated code tests. I'll merge it back into wat.t
Thanks for this. I commented on a few minor nits, but if you'd rather I merge this as-is then make those changes myself after, that's fine too. Just let me know. |
This will allow additional add-ons in the future (perhaps disable showing of updates?)
What syntax are you referring to? |
On Mon, Feb 2, 2015 at 3:32 PM, pat brisbin notifications@github.com
Oops, that was supposed to be a line-specific comment: : ${PACMAN_LOG:=/var/log/pacman.log} What does the ':' mean? |
${PACMAN_LOG:=/var/log/pacman.log}
# => error: /var/log/pacman.log command not found It's a nice idiom and is shorter than PACMAN_LOG="${PACMAN_LOG:-/var/log/pacman.log}" which is how you'd do that without |
Ah! Very neat :-) am going to enjoy using that one in the future.
|
This looks good enough to merge as-is. I'm OK with allowing |
Cool, thanks :-)
|
I wanted to see installed packages too. So I did. ;-)