Commit Graph

135 Commits

Author SHA1 Message Date
Justin Hileman
370b4dd2a5 Fix the blank lines in omf update output. (#394) 2016-09-01 23:20:11 -03:00
Stephen M. Coakley
fb6c2992ba Do not overwrite themes when installing from bundle (#385) 2016-08-29 22:18:27 -05:00
Stephen M. Coakley
cfe8e769db Refactor installer and config setup (#361)
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
2016-08-08 09:00:17 -05:00
Derek Willian Stavis
fcc9d4dc0a key bindings: test if reload function is available (#368)
This fixes a rare case when fish's builtin function
__fish_reload_key_bindings is not defined.
2016-07-23 20:49:42 -03:00
Stephen M. Coakley
e4bd035f15 Fix omf update exit status (#365) 2016-07-18 20:25:02 -03:00
Stephen M. Coakley
e9fb8ff3db Add hooks system for packages (#286) 2016-07-18 17:57:54 -05:00
Stephen M. Coakley
8ce0f3bd50 Align help text to use less extra space (#356) 2016-07-05 22:30:27 -05:00
Derek Willian Stavis
5095b5ba31 destroy: fix glob behavior on fish 2.3.0 (#327) 2016-06-05 00:30:56 -03:00
Derek Willian Stavis
0ca26d01e2 Fix theme key bindings (#334)
* init: load only key bindings from current theme

* theme: reload key bindings on theme change
2016-06-03 18:13:16 -03:00
Pablo Santiago Blum de Aguiar
db66200ca9 templates: use plugin for plugins and theme for themes 2016-06-03 14:00:20 -03:00
Pablo Santiago Blum de Aguiar
befebda9f2 templates: consistently use newlines before sections 2016-06-03 14:00:20 -03:00
Pablo Santiago Blum de Aguiar
7a815f32f0 templates: use https for all links 2016-06-03 14:00:20 -03:00
Luís Fiolhais
9afb439844 Fix autoload functions (#335) 2016-06-03 12:45:23 -03:00
Derek Willian Stavis
a164ebdd5d init: rewrite init process (#260)
* 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
2016-06-01 01:09:38 -03:00
Derek Willian Stavis
17de8c4b6b list: refactor code, fix fish 2.3.0 globs (#325) 2016-05-31 18:16:02 -03:00
Luís Fiolhais
15e9af84b1 Search Function (#314)
Add new search command
2016-05-11 13:29:50 -05:00
Sheldon Els
355b519c1e describe all packages works again 2016-05-10 07:57:04 +02:00
Sheldon Els
f7e1561067 indent correct on help for describe command 2016-05-10 07:57:04 +02:00
Andrew Rynhard
1853f30dd6 Use local variables 2016-04-19 01:16:58 -07:00
Andrew Rynhard
a5654cfec3 Use -L instead of -h 2016-04-19 00:34:33 -07:00
Andrew Rynhard
9b3a2586f2 Fix #303 2016-04-19 00:14:10 -07:00
Itzik Ephraim
0fc99b38b4 bugfix: Core update reported failure when up-to-date 2016-03-28 09:18:10 +03:00
Itzik Ephraim
720c499e61 Report up-to-date packages as such 2016-03-27 09:19:07 +03:00
Itzik Ephraim
f6b9bdd941 When pulling a repo, fetch first, to check for updates 2016-03-25 13:17:56 +03:00
Derek Stavis
a716badfd4 Implement safe shell reloading inside omf plugin
This commit adds an improved reload code for Oh My Fish, besides
saving the history now the reloading technique keeps directory
history and stack and clears fish_greeting, for a transparent
transition.

The reloading code is now safe regarding to background jobs. exec
wipes fish job control, so the user-facing code under the (just-
introduced by this commit) `omf reload` command is kept safe by a
warning. For testing purposes, `omf update` and `omf remove` rolls
automatic refresh only when `OMF_AUTO_RELOAD` variable is set.

Recap of the commit:
- Add improved reload code (omf.reload)
- Add a safe reload code (omf.cli.reload)
- Add `omf reload` command
- Add opt-in reload to `omf update` and `omf remove` commands
2016-03-24 18:43:23 -03:00
Itzik Ephraim
5764f0d9a4 omf doctor checks for fish & git versions
Minimum fish version: 2.2.0
Minimum git version: 1.9.5
2016-03-24 09:01:18 +02:00
Justin Hileman
b490fad367 Merge branch 'master' into deprecate-refresh 2016-03-23 08:10:27 -07:00
Derek Stavis
65dfadfc02 lib: deprecate available function
This PR officially marks available as deprecated, moving the
deprecated functionality to omf plugin compat quarantine directory.
2016-03-22 21:48:05 -03:00
Derek Stavis
37705618b2 lib: deprecate refresh function
With great power comes great responsibility. This function is
somewhat low level, and is harmful to shell's user, as it
completely screws up with job control (subprocesses).

This PR officially marks `refresh` as deprecated, moving the
deprecated functionality to omf plugin `compat` quarantine
directory.
2016-03-22 21:35:52 -03:00
Itzik Ephraim
fa24e67633 Allow selective updates 2016-03-13 11:44:45 +02:00
Itzik Ephraim
43ba8b97b7 Improve OMF CLI completions 2016-03-04 19:10:38 +02:00
Derek Stavis
49dda5c2f7 Reorganize omf plugin structure
This updates omf plugin to new architecture, moving
functions to `functions` directory. It also revamps the
separation of concerns between CLI and underlying
implementations, organizing them into directories,
whose are autoloaded in plugin startup.
2016-01-09 18:59:54 -02:00
Itzik Ephraim
4dbb1ca57c Support omf- prefix for packages 2016-01-01 20:15:49 +02:00
Bruno Pinto
58daae022b Improve assertion error messages 2015-12-21 23:00:49 +00:00
Bruno Pinto
148ce423ea Report duration of tests
OSX `date` does not support milliseconds output, so @derekstavis created
this `C` code to generate the time with milliseconds.
2015-12-21 21:53:25 +00:00
Bruno Pinto
8fac0ca484 Improve failure reports
Show name of the test that failed with the failure message.
2015-12-21 21:53:25 +00:00
Bruno Pinto
3d1a90e260 Split formatter from test runner 2015-12-21 21:53:25 +00:00
Itzik Ephraim
c5670bb9ee 'omf theme' now lists installed and other available themes separately.
Headings are underlined.
Current theme is highlighted in the Installed category.
2015-12-21 20:13:02 +02:00
Bruno Pinto
ea4d78ffc3 Basic omf tests 2015-12-19 11:46:09 +00:00
Bruno Pinto
e17dc1bfc1 Fish-spec plugin 2015-12-19 11:46:09 +00:00
Derek Stavis
acace9039c omf/templates: Align README headers based on omf's 2015-11-30 01:36:54 -02:00
Derek Stavis
fa88749da3 install: Implement package dependency installation 2015-11-17 21:07:12 -02:00
Bruno Pinto
f57ef1b4b5 Suppress basename usage output
When using basename without any arguments, a usage helper as following
is displayed:

```
usage: basename string [suffix]
       basename [-a] [-s suffix] string [...]
```

When listing the installed packages, if no theme was installed (e.g.
first installation), the `themes/` folder are empty and the usage helper
is displayed. This change addresses it by suppressing the message.
2015-11-12 12:41:36 +00:00
Derek Stavis
3fb8b3484b cli: fix #161 by inverting test argument order
Since `test` interprets arguments starting with a single dash as
options when comparing `test -h = --help` just swap parameter
orders as in `test --help = -h`. Also related to issue #161 is the
issue from fish repository at fish-shell/fish-shell#2332
2015-11-08 11:13:32 -02:00
Derek Stavis
00189cc6bf Fix more wrong basename usage cases 2015-11-04 19:01:08 -02:00
Derek Stavis
bc5e434b76 packages.list: Use basename -a with multiple paths 2015-11-04 09:33:53 -02:00
Derek Stavis
a1db5d5240 omf.repo.pull: Don't repeat yourself treatment 2015-10-25 00:21:09 -02:00
Derek Stavis
8db6b24966 omf.repo.pull: Simplify stashed flag using set -q 2015-10-18 23:49:10 -02:00
Derek Stavis
bdfc248452 omf/templates: Remove Travis from scaffolding 2015-10-17 21:55:28 -03:00
Derek Stavis
d224e01570 omf.bundle.install: Fix #123 by rewriting the code
Rewrites the code, as now `omf.install` is type
agnostic, and any -- preceded parameter will
be interpreted as package name.
2015-10-15 23:51:38 -03:00