Commit Graph

22 Commits

Author SHA1 Message Date
Stephen M. Coakley
8aef0b2d33
Handle missing theme setting more gracefully 2017-03-03 09:27:44 -06:00
Stephen M. Coakley
6404410be0 Implement update channels to introduce release versioning (#293) 2016-10-20 18:10:13 -05:00
Derek Stavis
9eb496de86 init: read theme again on key bindings reload 2016-07-05 09:23:38 -03:00
Derek Stavis
ac9b419825 init: don't try to double backup key bindings 2016-07-05 09:23:10 -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 Aguiar
77ac6fa261 init: set correct version number (#323) (#331) 2016-06-01 20:45:12 -05: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
Denis Koltsov
ce97843850 update version (#323)
* update version constant to 2
2016-05-30 16:05:48 -05:00
Derek Stavis
309fa3bdf1 Remove PATH save/restore code
Fixes #186 by removing the PATH save/restore code from init.fish.

There isn't a single occurence where Oh My Fish code changes the
value of PATH variable.

Plugin code which changes the PATH variable should be aware of
the side-effects and manage PATHs correctly, avoiding duplication.
2016-01-20 22:29:37 -02:00
Bruno Pinto
30ab05445d Add require function to support plugin dep
In order to support dependency between plugins a function called
`require` has been added.
2015-10-02 21:35:06 +01:00
Bruno Pinto
ceb31c143a Source init.fish on each plugin.
Unnecessarily sourcing a `$plugin_name.fish` is affecting the loading
time.
2015-10-02 21:35:05 +01:00
Stephen Coakley
18679d866e Split custom "init.fish" into clearer "before.init.fish" and "init.fish" 2015-10-02 11:33:23 -05:00
Derek Stavis
c58d14fe3e Move $OMF_CONFIG variable to $OMF_PATH/init.fish
This PR sets the default value of `OMF_CONFIG` variable in
framework init.fish file. The variable can still be overridden by
the user by setting it on `~/.config/fish/config.fish file`.

This is in preparation to rewriting install script in plain fish,
which will ditch config template and stop replacing `config.fish`
contents in favor of just appending Oh My Fish startup.
2015-09-29 09:54:36 -03:00
Bruno Pinto
b36bc03eb0 Remove global OSTYPE variable. 2015-09-05 19:20:24 +01:00
Bruno Pinto
2ac89b5a1c Rename RESET_PATH to ORIGINAL_PATH
This variable records the value of $PATH environment variable before
oh-my-fish is sourced. When we "reload" the framework, we reset $PATH
with this recorded value so that we boot from a clean state.
2015-09-05 19:20:24 +01:00
Bruno Pinto
8aa6bf7ee2 Remove unnecessary code
This was actually trying to load PATHs that do not exist under $OMF_CONFIG
directory and sourcing files that did not exist.
2015-09-05 19:20:19 +01:00
Bruno Pinto
8aa60c55ae Do not source events.fish
We don't use it for anything.
2015-09-04 19:18:57 +01:00
Bruno Pinto
ae0e4388b6 Back to oh-my-fish organization 2015-09-03 19:35:19 +01:00
Jorge Bucaran
84872300df refactor botched source calls with ^/dev/null 2015-08-28 18:35:49 +09:00
Harrison Heck
7d47220770 Add checks to see if file exists before source.
Fixes #524.
2015-08-28 18:31:50 +09:00
Justin Hileman
0359ba047c Merge $OMF_CONFIG and $OMF_CUSTOM.
Per conversation with @bpinto in Gitter.

There's no need for two separate directories. You don't have a `.git` and `.git-custom` folder, you just put your config in `.git` :)

The most straightforward interpretation of XDG basedir spec is that user configuration for omf would go in `~/.config/omf`, so let's put it there. The only question is whether omf-generated config (i.e. the `theme` file) should go there as well. By analogy with git, programmatically generated config should probably be merged in with user config. This also makes it so when a user clones their dotfiles to a new machine, both kinds of settings come with it.
2015-08-27 11:02:30 -07:00
Jorge Bucaran
2693a2fd18 %%% United States of the Fish → Wahoo + OMF %%% 2015-08-27 00:20:13 +09:00