Commit Graph

14 Commits

Author SHA1 Message Date
Bruno Pinto
c346731743 Simplify install command
- Install does not do update.
- Share code when installing from URL or name.
2015-10-14 01:40:44 -03:00
Derek Stavis
ea0b464f1d omf.theme: Rework theme activation code
- Move theme installation to cli entry point (omf.fish)
- Generalize XDG_CONFIG_HOME code in `omf.xdg.config_home`
- Generalize prompt conflicts check in `omf.checks.fish_prompt`
  * Migrate `omf.doctor` to use it

+ Change theme activation steps
  - Create user function path if not existent
  - Check for conflicts in fish_prompt, aborts if found
  - Remove current theme from autoloading paths
  - Add target theme to autoloading paths
  - Link target theme's fish_prompt to user's
  - Persist selected theme to $OMF_CONFIG/theme

This approach brings two major advantages:

- Theme prompt now shows accordingly in fish_config web interface
- Faster theme changes, reducing it from seconds to some milis
- Avoids calling refresh, which makes users much more happy
2015-10-07 00:50:14 -03:00
Derek Stavis
a99e3ce86a omf.install: Fix success/error return codes
Return 0 when package installs, != 0 on error
2015-10-06 18:00:10 -03:00
jeremiejig
5cdde2639a bin/install & omf.repo.pull adding -C $git_dir removing pushd and popd 2015-09-27 18:53:51 +02:00
Derek Stavis
c929fa41ab bundle: move related functions to omf.bundle namespace 2015-09-08 11:03:14 -03:00
Bruno Pinto
890104ab2e Extract git clone calls into omf.repo.clone 2015-09-07 00:11:20 +01:00
Bruno Pinto
af49d6f1c2 Replace omf.util_sync with omf.repo.pull
Based on
https://github.com/Homebrew/homebrew/blob/master/Library/Homebrew/cmd/update.rb#L175-L221
2015-09-07 00:11:12 +01:00
Bruno Pinto
033d976dee Extract _write_bundle to omf.persist
- Add support for persisting theme information.
- Use documented private function naming scheme.
2015-09-06 22:32:13 +01:00
Bruno
75594ea4e2 Merge pull request #20 from scorphus/typos
Fix a typo: succesfully => successfully
2015-09-06 22:31:37 +01:00
Pablo Santiago Blum de Aguiar
59491926af Fix a typo: succesfully => successfully 2015-09-06 17:01:11 -03:00
Bruno Pinto
905f6afa73 Remove pkg-/theme- from folder name
When installing packages (plugins) or themes using a URL, we should
strip the plugin-/pkg-/theme- from the repository name if it exists.
2015-09-06 13:52:23 +01:00
Derek Stavis
2535892c87 omf.install: insert installed packages into bundle 2015-08-31 20:39:21 -03:00
Bruno Pinto
62a45e9ec2 Convert version and help into options
Instead of clobbering the actions with both version and help, use
options instead. They are also going to be used for subcommands (e.g.
omf list --help) once they support options.
2015-08-28 17:08:40 +01:00
Wes Morgan
c6e72863bd centralize pkg / theme installation 2015-08-28 18:28:47 +09:00