Derek Stavis
7ccdada8c6
omf install: Don't refresh when nothing installed
2015-10-14 01:40:45 -03:00
Bruno Pinto
e234aab3c6
Remove .git$ from name when installing from URL
...
Support `omf install https://github.com/oh-my-fish/plugin-jump.git `
2015-10-14 01:40:45 -03:00
Bruno Pinto
cc7b321268
Create omf.update
function
...
Update and install were one thing before.
2015-10-14 01:40:45 -03:00
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
67c07cb6f6
Fixes a regression in update process added in #115
...
As #115 migrated list functions, after updating Oh My Fish code
the omf.list_installed_packages gets removed, but is still being
used by the update code.
This commit fixes it by providing a wrapper function.
2015-10-13 10:30:06 -03:00
Bruno Pinto
870efd0dda
Merge all omf list functions
2015-10-12 21:05:23 +01:00
Bruno Pinto
7025525ef1
Simplify omf cd
code
...
This also namespace the function to `omf.packages`.
2015-10-12 18:25:12 +01:00
nwykes
ffa6338664
update some cli completions: remove query and version. add doctor
2015-10-08 13:28:50 -06: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
Derek Stavis
291d0c9784
bundle.add: fix theme being persisted twice
...
`omf theme` was persisting the installed theme twice, one time on
`omf.install` and other time on `omf.bundle.add`.
2015-10-06 17:05:16 -03:00
Derek Stavis
05f3be01be
destroy: Revert fish_prompt backup when found
...
Works toward generalizing the backup restoration logic using a
function, then restoring both config.fish and fish_prompt.
2015-10-05 14:11:59 -03:00
Bruno Pinto
653f173971
Forgot to suppress error message
2015-10-04 13:49:58 +01:00
Bruno Pinto
1ab8a20b8c
Fix #8 : Fishy plugin template
2015-10-03 22:18:52 +01:00
Bruno Pinto
520d597947
Source uninstall.fish
file before emitting event
...
Instead of having every plugin function inside the same file, which
increases the loading time unnecessarily and is not fishy, source the
`uninstall.fish` file for the plugin before the `uninstall_$plugin_name`
event is emitted.
2015-10-03 22:11:49 +01:00
Bruno Pinto
bc0d4847e8
Resolve #30 : omf doctor command
...
In order to pro-actively diagnose an issue on someone's computer, a
`omf doctor' command is being added. This command will initially check
errors that could cause a theme to not be loaded, but in the future more
checks are going to be added to prevent issues from being created for
problems that are fixable by the Oh My Fish user alone.
2015-10-03 21:04:30 +01:00
Bruno Pinto
cf8a24deed
Only emit uninstall_* event on omf destroy
...
When calling `omf destroy`, the `bundle` file is completely erased
because we are calling `remove_package` on each installed package. We
don't want to erase that file, we just want to emit the event and later
on remove the code, which is done with `rm -rf "$OMF_PATH"`.
2015-10-03 01:10:23 +01:00
Bruno Pinto
46e4d036ba
Organize commands and remove undocumented aliases
2015-10-03 01:07:40 +01:00
Bruno Pinto
319c8a05cd
Don't overwrite function on test environment
...
Instead of overwriting functions that use `exec fish` on test
environment, skip this call if the variable `CI` has been defined on the
running shell.
2015-10-02 23:50:18 +01:00
Bruno Pinto
e2a7f7d229
Split into init.fish and omf.fish files
2015-10-02 21:35:06 +01:00
Bruno Pinto
9cc8ee5a82
Stash does not support --git-dir
...
Stash is a shell script that does not support `--git-dir`, not even on
latest versions. We need to use `git -C` which was only added on recent
versions of `git`.
`omf update` will fail in case omf need needs to run `git stash` and
git is not compatible.
2015-10-02 21:16:50 +01:00
jeremiejig
56b1d837e0
changing to git -C to git --git-dir work-tree
2015-09-27 18:53:51 +02:00
jeremiejig
5cdde2639a
bin/install & omf.repo.pull adding -C $git_dir removing pushd and popd
2015-09-27 18:53:51 +02:00
jeremiejig
773f1010b9
omf.destroy: find the most recent backup of config.
...
using XDG_CONFIG_HOME
2015-09-26 22:32:10 +02:00
jeremiejig
b9c1bd9576
Fixing how omf remove work, and omf.remove_package
...
destroy was broken because of a premature refresh. (giving false hang
behaviour)
2015-09-26 22:32:10 +02:00
jeremiejig
8d1b4dc897
Using raw name_or_url
instead of name
.
2015-09-13 23:22:12 +02:00
Derek Stavis
de9955e025
omf.bundle.install: sort the bundle after install
2015-09-13 18:13:22 -03:00
Derek Stavis
d3ace4fd81
omf.bundle.install: replace uniq
by sort -u
2015-09-13 18:13:22 -03:00
Derek Stavis
56bc40bde9
omf.bundle.remove: return 0 when done
2015-09-13 18:13:22 -03:00
Derek Stavis
b20f8dd141
omf.bundle.remove: replace uniq
by sort -u
2015-09-13 18:13:22 -03:00
Derek Stavis
00e3d3e058
omf.bundle.add: sort the bundle after adding entry
2015-09-13 18:13:21 -03:00
Derek Stavis
a71bc714f4
completions: use standard fish functions for subcommands
2015-09-09 21:03:05 -03:00
Derek Stavis
c929fa41ab
bundle: move related functions to omf.bundle namespace
2015-09-08 11:03:14 -03:00
Bruno Pinto
61f71f3ce8
Replace omf.update
with omf.repo.pull
...
- Pull repository from origin unless upstream exist.
2015-09-06 21:32:26 -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
2a0e5ba7cc
Remove unused util_fork_repo
function.
2015-09-06 23:07:18 +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
Bruno Pinto
b36bc03eb0
Remove global OSTYPE variable.
2015-09-05 19:20:24 +01:00
Bruno Pinto
ae0e4388b6
Back to oh-my-fish organization
2015-09-03 19:35:19 +01:00
Bruno Pinto
7dad917436
Make default
theme the default theme for omf.
...
* On clean install, configure and download `default` theme.
* Do not allow `default` theme to be removed.
* When the current theme is removed, fallback to `default`.
2015-09-01 12:38:32 +01:00
Derek Stavis
a76485be4f
omf.help: update install command usage
2015-08-31 20:39:54 -03:00
Derek Stavis
0a195572a1
omf: install without arguments installs bundle
2015-08-31 20:39:54 -03:00
Derek Stavis
c6df5feba5
omf.remove_package: also remove from bundle
2015-08-31 20:39:21 -03:00
Derek Stavis
2535892c87
omf.install: insert installed packages into bundle
2015-08-31 20:39:21 -03:00
Derek Stavis
e8dcbb507b
omf: add install_bundle function
2015-08-31 20:39:21 -03:00
Bruno
98870e8720
Merge pull request #574 from sheldon/describe-without-ruby
...
describe without ruby
2015-08-31 21:39:15 +01:00
Sheldon Els
99193d0e3a
describe without ruby
...
no dependency on ruby & a little quicker. all credit to @derekstavis for the
cool regexs
2015-08-31 22:37:56 +02:00
Sheldon Els
633e52101b
describe works on installed packages
...
also modified list_db_packages to return all packages by default, but with a
skip_installed to skip listing installed packages
2015-08-31 22:04:51 +02:00
Sheldon Els
04e86fa00d
autocomplete help
2015-08-30 15:32:18 +02:00
Gabriel Marquez
3acfae98b1
implements help for commands
2015-08-29 16:42:34 -03:00
Bruno Pinto
6f4368870e
Fix #545 : Remove custom packages and themes
...
Remove function was not deleting packages and themes from the OMF_CONFIG
folder.
2015-08-29 19:29:37 +01:00
Sheldon Els
00701642e8
info command
...
to easily see from commandline what each package does via their descriptions
on github
2015-08-29 18:48:29 +02:00
Bruno Pinto
130fc2119d
Forgot to add omf cd
on help.
2015-08-29 00:23:58 +01:00
Bruno Pinto
7706d848cc
Fix dim color that was the same as em
2015-08-28 17:47:50 +01:00
Bruno Pinto
ecb9dfa0a9
omf cd
command for changing directories.
...
Jump around Oh My Fish packages and themes using `omf cd <name>`. If no
<name> is specified, jump to oh my fish root folder.
2015-08-28 17:23:20 +01: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
Bruno Pinto
2222db74d8
Change theme when creating a new theme
...
We already change the current directory to the theme dir, to make it
easier for development, we also change the current theme.
2015-08-28 13:15:31 +01:00
Jorge Bucaran
d107b2ec1e
simplify color setters
2015-08-28 18:35:50 +09:00
Bruno Pinto
0767b2a72f
Fish < 2.2 does not support argument for set_color
...
The second argument (background) was added on fish 2.2
2015-08-28 18:33:31 +09:00
Wes Morgan
c6e72863bd
centralize pkg / theme installation
2015-08-28 18:28:47 +09:00
Bruno Pinto
bfe77b6273
Handle scenarios where colors are not defined.
...
Fish should set default colors:
b32f770a69/share/functions/__fish_config_interactive.fish
But in case some users don't have these color variables set, use their
defaults values.
2015-08-28 18:24:57 +09:00
Bruno Pinto
20ed43983b
Naming functions with omf.
namespace.
...
Having a clear namespace `omf.` improves the readability of the code as
we clarify what is the function name and what is the namespace.
2015-08-28 18:24:56 +09:00
Bruno Pinto
2ecc1fc100
Use fish's colors
...
Instead of using custom colors, reuse fish's colors.
Original fish colors here:
4d628d5f43/functions/restore_original_fish_colors.fish
2015-08-28 18:21:03 +09:00
Wes Morgan
2564e7446c
refresh after installing package or theme
...
The functions themselves no longer do that.
2015-08-28 18:21:03 +09:00
Wes Morgan
718ba2fc10
don't refresh in omf_theme
...
Leave that up to the caller.
2015-08-28 18:21:03 +09:00
Wes Morgan
4809687b52
don't refresh in omf_install_package
...
Leave that up to the caller.
2015-08-28 18:21:03 +09:00
Bruno Pinto
b5591c97d0
Improve template README
...
Layout and links
2015-08-28 18:21:03 +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
a1c319db73
fix template generator using incorrect variable USERNAME → USER
2015-08-27 10:28:00 +09:00
Jorge Bucaran
fa46c0118e
Merge pull request #519 from fish-shell/get-renamed-to-install
...
Rename 'get' to 'install'
2015-08-27 07:24:02 +09:00
Jorge Bucaran
c855e0024c
fix omf new theme and remove default theme
2015-08-27 06:04:24 +09:00
Bruno Pinto
24ab9a991b
Rename 'get' to 'install'
...
We already use 'install' on the command description: 'Install one or
more packages.'
Also call update using 'u' instead of 'p'.
2015-08-26 21:19:40 +01:00
Bruno Pinto
7f53f59ee6
Remove unused code
...
`default` was doing nothing.
2015-08-26 20:14:23 +01:00
Jorge Bucaran
c480308889
remove references to wa
2015-08-27 03:58:35 +09:00
Jorge Bucaran
ed688aac2d
fix use of older omf_use in omf_remove_package
2015-08-27 03:15:05 +09:00
Bruno Pinto
a9df3e1e98
Rename omf use
to omf theme
.
...
The first time I saw `use`, I thought I could use the command for
everything, including packages, but it's only used for themes. So, it's
better to have a clearer name.
2015-08-26 19:09:11 +01:00
Jorge Bucaran
e68f83ffeb
fix omf_get_package typo
2015-08-27 02:06:18 +09:00
Jorge Bucaran
2693a2fd18
%%% United States of the Fish → Wahoo + OMF %%%
2015-08-27 00:20:13 +09:00