Refactor the installer to be more maintainable and interactive. The installer is now more robust and safe in its operation, and asks interactive questions for choices that the user must resolve. Setting up confuguration is also now changed to take advantage of Fish 2.3 features and does not mess with user's configuration files without permission.
- Make installer smarter and use uninstaller in destroy
- Better handling and checking for offline installs
- `omf destroy` simply uses `install --uninstall`
- Final warning message is no longer displayed when user intentionally aborts install
- Backups are restored during uninstall
- Update the README to detail the new ways to install OMF
Refactor autoload: Split the big function into two smaller ones,
doing only option parsing at main function.
The algorithm is also rewritten, now in two steps for both path
inclusion an exclusion functions: 1) use auxiliary lists to store
valid function and completion paths, 2) bulk insert or remove just
once in the variable.
Now also respects path insertion policy, keeping user function
path always in front of other paths, thus allowing precedence of
user functions.
* init: rewrite init process
Now use pure globbing to generate 100% valid function and
completion paths, effectively splitting the init process in two
steps, one which paths are added, and other when initialization
is done (sourcing init).
This initialization code introduces a new interface for
`init.fish` hook, which deprecates the previously used event
model. The new interface injects three variables into `init.fish`:
path, package and bundle. This variables can be used by the
package to autoload paths, use bundled files, etc.
Also supports key bindings by sourcing
$OMF_CONFIG/key_bindings.fish and also key_bindings.fish in
packages (plugins and themes) root directories. This is done
when fish_user_key_bindings is called.
* omf: migrate to new init hook
* omf/templates: migrate to new init and uninstall hooks
* docs: document new init and uninstall hooks interface
* README: update new hook interface spec