Call xargs
quickly.
Well, the name may be over claimed because I did not implement all functionalities of xargs
.
MacOS is simple.
$ brew install iwat/public/qxargs
Other OS needs to build from source, which is also one liner.
$ go get github.com/iwat/qxargs
This should be understandable.
SYNOPSIS
qxargs [flags] command filters ...
qxargs [flags] command commandargs ... -- filters ...
DESCRIPTION
Execute command on the list of files that match the given filter.
command The command to be executed with the matches files.
filters There are 2 kinds of filters are supported, name filter and content filter.
Simple string will be treated as file name filter.
String with leading '?' will be treat as content filter.
Multiple filters will be treated as AND.
EXAMPLES
To execute vim on any file that has go in their name.
$ qxargs vim go
To execute vim -p on any file that has go in their name.
$ qxargs vim -p -- go
To execute vim -p on any file that has go in their name and has newGrepper in their contents.
$ qxargs vim -p -- go ?newGrepper
Sure, I love animation.
qxargs vi fli
qxargs vi -o -- find
I have interactive mode too. Actually, there is no way to disable it right now.
It's MIT license.
In short:
-
Permissions
- Commercial use
- Modification
- Distribution
- Private use
-
Conditions
- License and copyright notice
-
Limitations
- Liability
- Warranty