Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ab/pick
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/ab/pick
- Owner: ab
- License: gpl-3.0
- Created: 2017-10-15T21:04:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-18T02:20:26.000Z (about 7 years ago)
- Last Synced: 2024-11-14T01:08:19.514Z (about 1 month ago)
- Language: Ruby
- Size: 23.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Pick
Pick is a command line tool for selecting from multiple options. It takes items
on standard input or from a file, and interactively prompts you to choose one
or more of them.## Installation
```sh
gem install pick
```## Examples
```sh
# select a file
ls | pick# edit a file under the current directory tree
vim $(find . -type f | pick)# edit multiple files under the current directory tree
vim $(find . -type f | pick -m)# check out a branch interactively
git branch -a | pick | xargs git checkout# delete a file, safe even when filenames contain newlines
find . -type f -print0 | pick -0 | xargs -0 rm -v# delete many files
find . -type f -print0 | pick -0 -m | xargs -0 rm -v# choose a color from colors.txt
pick colors.txt
```## Development
After checking out the repo, run `bundle install` to install dependencies. Then, run `rake test` to run the tests. You can use `pry -r ./lib/pick` to get an interactive shell.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/ab/pick/.
## License
The gem is available as open source under the terms of the [GPL v3](https://opensource.org/licenses/GPL-3.0).