Skip to content
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

Null option are now effected with l option. #144

Merged
merged 1 commit into from
Jul 8, 2016

Conversation

monochromegane
Copy link
Owner

refs: #143

I think this should have an effect when passed -l option.
Because xargs -0 option expect filenames.

Before

It dosen't work.

go run cmd/pt/main.go --null -l go
README.md
Godeps/Godeps.json
decoder.go
encoder.go
find.go
platinum_searcher.go
formatter.go
search.go
files/ascii.txt
walk.go
formatter_test.go
grep.go
wercker.yml
line_grep_test.go
grep_test.go
ignore.go
option.go
files/vcs/match/match.txt
find_test.go
files/vcs/ignore/ignore.txt
files/ja/broken_utf8.txt
files/ja/broken_shift_jis.txt
files/depth/file_1.txt
files/vcs/match/ignore.txt
files/ja/euc-jp.txt
files/ja/utf8.txt
files/ja/shift_jis.txt
files/depth/dir_1/file_2.txt
files/context/context.txt
files/vcs/absolute/ignore.txt
files/ja/broken_euc-jp.txt
files/depth/dir_1/dir_2/file_3.txt

After

It works.

go run cmd/pt/main.go -0 -l go
encoder.godecoder.goGodeps/Godeps.jsonline_grep_test.goplatinum_searcher.gosearch.gooption.gowalk.gofind.goREADME.mdfind_test.gogrep.gowercker.ymlfiles/vcs/match/match.txtformatter.gogrep_test.goformatter_test.goignore.gofiles/ascii.txtfiles/depth/file_1.txtfiles/vcs/ignore/ignore.txtfiles/ja/utf8.txtfiles/context/context.txtfiles/vcs/match/ignore.txtfiles/ja/broken_shift_jis.txtfiles/ja/broken_utf8.txtfiles/ja/euc-jp.txtfiles/ja/broken_euc-jp.txtfiles/depth/dir_1/file_2.txtfiles/ja/shift_jis.txtfiles/vcs/absolute/ignore.txtfiles/depth/dir_1/dir_2/file_3.txt

@monochromegane
Copy link
Owner Author

One more thing.
A short option -0 are now added.

@monochromegane monochromegane merged commit c406ee9 into master Jul 8, 2016
@monochromegane monochromegane deleted the use-null-with-l-option branch July 8, 2016 11:57
@kohlerm
Copy link
Contributor

kohlerm commented Jul 10, 2016

Great! I plan to write a blog about why this is useful.

@monochromegane
Copy link
Owner Author

Sounds good !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants