Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 11 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,58 +6,55 @@

Fylla, the Norse word for `complete`, is an autocompletion script generator for the [Thor](whatisthor.com) framework.

It currently generates zsh completion scripts, but will soon have support for bash scripts as well.

## Installation

Add this line to your application's Gemfile:
Add the following line to your application's Gemfile:

```ruby
gem 'fylla'
```

And then execute:
And execute using the following command:

$ bundle

Or install it yourself as:
Or install fylla manually:

$ gem install fylla

## Usage

`Fylla` must be loaded before `Thor.start` is called in order for it to be used.
Fylla must be loaded before `Thor.start` (the method) is called, in order for Fylla to be callable, else no completions will be generated.

General use case will be to create a new subcommand or option that calls `Fylla.zsh_completion(self)`

`Fylla#zsh_completion` returns a string containing the entire zsh completion script, that you can
use to do what you see fit.
`Fylla#zsh_completion` returns a string containing the entire zsh completion script, that you can use to do what you see fit.

Same for bash completion.

The only requirement for calling `Fylla.zsh_completion(self)` is that `Thor` has loaded all commands/options/etc.
The only requirement for calling `Fylla.zsh_completion(self)` is for `Thor` to load all commands/options/etc..

## Development

After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything from here to the Todo list is generated by ruby so it should probably be left alone. Maybe small steps 😜

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All changes after this part are very small. Sentences that start with 'This' is replaced with 'The project'. 'Welcome' changed to 'welcomed' as using 'welcomed' makes sense in the sentence. All changes are are small and mostly single words. Sentence structure is not changed. Edits are required in part generated by ruby...

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).
To install the 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/snowe2010/fylla. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
Bug reports and pull requests are welcomed on GitHub at https://github.com/snowe2010/fylla. Fylla is intended to be a safe, welcoming space for collaboration. Contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).

## Code of Conduct

Everyone interacting in the Fylla project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/fylla/blob/master/CODE_OF_CONDUCT.md).
People interacting in the Fylla project’s codebases, issue trackers, chat rooms and mailing lists are expected to follow the [code of conduct](https://github.com/[USERNAME]/fylla/blob/master/CODE_OF_CONDUCT.md).

## Todo list

* use desc if banner isn't present
* Use desc if banner isn't present
* add completion parameter to Option class to use by default
* allow zsh_completion and bash_completion to be called from _anywhere_. This might be impossible.
* allow zsh_completion and bash_completion to be called from anywhere. This might be impossible.
* allow supplying custom templates