Commit graph

6 commits

Author SHA1 Message Date
Thomas Scholtes
44c843793b Add completion of plugin commands 2014-03-02 16:18:16 +01:00
Thomas Scholtes
2b0929b71b Complete queries 2014-02-27 22:13:09 +01:00
Thomas Scholtes
996a1d6c90 Use bash-completion package 2014-02-27 17:52:23 +01:00
Thomas Scholtes
211d3ac1cb Do not evaluate in subshell 2014-02-27 15:28:16 +01:00
Thomas Scholtes
e8e0682aae Add completion support for bash 3.2
Bash 3.2 does not have associative arrays, so we hack around that by using
generic varibale names like `opts__$cmd`. We also don't support the "?" alias
anymore.
2014-02-22 17:59:23 +01:00
Thomas Scholtes
14ece207c9 Add completion command
The command prints a shell script that provides completion for the `beet`
command. To test it run `eval "$(beet completion)"` in your shell.

I also included some crude testing for this. The `test/test_completion.sh`
script runs tests in a shell and exit with a non-zero status code if the tests
fail. It assumes that the completion script is already loaded in the executing
shell.

As of now the completion only works for bash 4.1 and newer.
2014-02-20 01:15:03 +01:00