Commit graph

172 commits

Author SHA1 Message Date
Jorge Bucaran
4591912607 Do not hide installed plugins in fisher ls-remote. Close #250. 2016-05-06 01:22:52 +09:00
Jorge Bucaran
4fe8b7987a No-column print in ls and ls-remote if piping isatty stdout. Close #249. 2016-05-06 01:22:52 +09:00
Jorge Bucaran
33f4039f15 Grammar. 2016-05-06 01:22:52 +09:00
detailyang
0b5c6f7a27 Use command date +%s%3N in non OS X systems to get the epoch in ms. #252
* Define __fisher_get_epoch_in_ms on fisher.fish load and select
  command date if the user for systems other than OS X.
2016-05-05 13:16:23 +09:00
Jorge Bucaran
18bb34f8b1 Bump to 2.5.0 📦 2016-05-03 03:26:55 +09:00
Jorge Bucaran
2a9ad1b338 Use -R instead of -r with cp. 2016-05-03 03:26:20 +09:00
Jorge Bucaran
167af16549 Increment dependency ref count if passed in the cli as argv.
To install `parent` with `child`, the user only needs to
enter `fisher parent`, but given the following scenario:

    fisher parent child

and before this commit, fisherman would fail to increase the
ref count of children because the function that calculates
missing dependencies would see that `child` is already in
the argv list.

The above, even if rare, is a valid use case, and `child`
should end up with a ref count of 2 instead of 1.
2016-05-03 02:55:21 +09:00
Jorge Bucaran
0309ed11f7 Remove distracting arrows from fetch message. 2016-05-02 20:15:17 +09:00
Jorge Bucaran
84af062804 Add plugin dependency reference counting. Close #226. 2016-05-02 20:02:20 +09:00
Jorge Bucaran
3fb0448aef Simplify plugin_is_prompt check. 2016-05-02 03:02:43 +09:00
Jorge Bucaran
fb0bd0213e Use perl or python (whichever is available and in that order) to check index age. 2016-05-02 02:54:45 +09:00
Jorge Bucaran
28eb783d8c Simplify ls-remote usage instructions. 2016-05-02 01:58:55 +09:00
Jorge Bucaran
b69eca6a28 Update manpage instructions. 2016-05-02 01:55:01 +09:00
Jorge Bucaran
7b1602df0a Query __fisher functions and erase matches in self-uninstall. 2016-05-02 01:52:20 +09:00
Jorge Bucaran
0247f3ef8c Do not overwrite fish_colors when updating current prompt. Fix #248. 2016-05-02 01:43:30 +09:00
Jorge Bucaran
ccbdc42b7a Remove fetched plugins from the config when there is a fetch error. Fix #247. 2016-05-02 01:11:36 +09:00
Jorge Bucaran
2cbe6b6b53 Parse config path glob in advance during completion step. 2016-05-01 18:24:54 +09:00
Jorge Bucaran
0df81482c8 Add undocumented self-uninstall alias to self-destroy. 2016-05-01 16:02:43 +09:00
Jorge Bucaran
406ba96a00 Unset color uvar if color is blank. 2016-05-01 15:53:22 +09:00
Jorge Bucaran
d646e37bef Make spinner more noticeable. 2016-05-01 15:03:21 +09:00
Jorge Bucaran
0219a4a618 Run file age check, only if we can get a value from __fisher_get_file_age.
This probably means the user does not have python installed on their
system and we will be download the index every time the user runs
ls-remote.

A more sensitive, python-less solution to check file age since the last
time the file was modified should be more desirable.
2016-05-01 12:37:29 +09:00
Jorge Bucaran
b8884dc3e0 Say 'pulled X commits' when updating. 2016-05-01 12:23:08 +09:00
Jorge Bucaran
89daf29f46 Do not generate false color uvars if value is not previously set. 2016-05-01 11:56:59 +09:00
Jorge Bucaran
2317d88440 Bump to 2.4.1 📦 2016-05-01 03:19:44 +09:00
Jorge Bucaran
4f7b59e332 Fix bug where undefined fish colors where set to incorrect values. Fix #246. 2016-05-01 03:19:25 +09:00
Jorge Bucaran
cfa2df247e Bump to 2.3.4 📦 2016-04-30 18:42:06 +09:00
Jorge Bucaran
ea34626b40 Do not rewrite fishfile in ls or ls-remote. 2016-04-30 18:41:13 +09:00
Jorge Bucaran
b32442f480 Make fisher install behave like fisher when not on the right
side of a pipe. Correct fix for #218.
2016-04-30 18:38:56 +09:00
Jorge Bucaran
b3c604c43b Bump to 2.3.3 📦 2016-04-30 04:12:13 +09:00
Jorge Bucaran
986ea3741e Teach ls to handle multiple arguments. Close #243. 2016-04-30 04:11:51 +09:00
Jorge Bucaran
5133e180bb Match multiple keys with ls-remote [--format=fmt_str] k1 k2 k3
Also fix regression in ls-remote that was displaying both
installed and remote plugins.
2016-04-30 04:00:44 +09:00
Jorge Bucaran
b6c6bbbba1 Fix bug where main completions were getting overwritten. 2016-04-30 02:46:29 +09:00
Jorge Bucaran
220afc4c29 Allow fisher without args to read from stdin if not a tty. Close #224. 2016-04-30 00:14:45 +09:00
Jorge Bucaran
ef19df1e71 Add black list check when performing ls-remote completions. 2016-04-29 23:59:56 +09:00
Jorge Bucaran
9328494d8e Bump to 2.3.1 📦 2016-04-29 22:41:11 +09:00
Jorge Bucaran
f8390474be Do not update the index when performing ls-remote completions. 2016-04-29 22:41:11 +09:00
Jorge Bucaran
67b981166c Download the JSON data from GitHub and transform it into a tab
delimited, awk-friendy format and put it in .cache/.index.

During the process, sort the data also. This way, don't need
to repeat the same process every time we run ls-remote.

Add completions for ls-remote with plugin name and info.
2016-04-29 22:41:11 +09:00
Jorge Bucaran
dadae12cae Bump to 2.3.0 📦 2016-04-29 17:33:25 +09:00
Jorge Bucaran
631e825f85 Add line breaks and run other post processing on the JSON response
when updating the index for ls-remote.

Allow ls-remote to accept a key and always print record if it
matches the plugin's name. Works with the format string too.

Close #234, #236, #238
2016-04-29 17:33:25 +09:00
Jorge Bucaran
151a50b0a1 Bump to 2.2.0 📦 2016-04-29 04:18:28 +09:00
Jorge Bucaran
65eb3b2967 Add new sub command ls-remote to list what plugins you can install.
Running fisher ls-remote will query the GitHub API for all the
repos in the fisherman org and retrieve the JSON file which is
saved to .cache/fisherman/.index.json.

This file is updated every half and hour whenever you run the
command again. This number is subject to change in the future
as we learn how people are actually using this option.

The ls-remote option can take --format=<fmt string> option used
to customize the list output.

By default, it shows only names and breaks it into columns as
wide as your terminal window.

<fmt string> can contain \t tabs or \n line breaks and one or
more of the following variables with information about plugins.

  *  %name
  *  %info
  *  %url
  *  %stars
2016-04-29 04:10:21 +09:00
Jorge Bucaran
d82a245300 Do not return 1 if fisher succeeds.
Other
 * Better logic when leaving early in case of a fail install.
 * Colorize task completion duration.
2016-04-28 14:36:18 +09:00
Jorge Bucaran
87805d0d75 Bump to 2.1.13 📦
* Use more appropriate wording when updating symlinks,
  instead of "skipped", use "synced", since symlinks
  are processed justs like regular plugins.
2016-04-27 07:49:23 +09:00
Jorge Bucaran
ef98a6dba8 Ditch -F option in ln and simplify code introduced in #231.
ln -F is relevant only when the target is a directory, in which
case `ln` will delete the directory so that the link can occur.

In fisherman, we use links in only two places:

1. Linking files into .config/fish/{functions,completions}, and
2. Linking local plugins into the .config/fisherman

If my calculations are correct, we don't need -F in either case.

Both {functions/completions} never contain directories, so (1)
is probably safe. The fisherman config only contains directories
to installed plugins, so not using -F actually prevents the user
from overwriting a plugin currently installed with a local plugin.
2016-04-27 02:05:04 +09:00
Scott Bonds
6cbfb35798 Check OS and use appropriate `ln` options (#231)
Note: OpenBSD's ln does not support the -F flag.
2016-04-27 01:33:29 +09:00
Jorge Bucaran
c6feba5430 Bump to 2.1.11 📦 2016-04-27 01:22:53 +09:00
Jorge Bucaran
db3d7bb09d Overwrite cached plugin after updating copy in the config.
The previous implementation was creating a nested copy of
the target directory (updated plugin) inside the cached
copy.

After some research, I believe there are two things we
can do here:

1. Remove the target and create a new copy or

2. Use the following syntax

      cp -rf src_dir/. target_dir

   which seems to do what we want, overwrite target with
   source entirely.
2016-04-27 01:19:27 +09:00
Jorge Bucaran
b5d69e9108 Move completions/fisher.fish creation to the top of the function. 2016-04-26 02:32:09 +09:00
Jorge Bucaran
0daa06d91f Bump to 2.1.10 📦 2016-04-25 14:20:49 +09:00
Jorge Bucaran
f1a1632deb Remove useless check for files that start with . in __fisher_list_plugin_directory. 2016-04-25 14:19:33 +09:00
Decors
9ff08e2d92 Fix `fisher ls <plugin>` incorrect directory display (#221) 2016-04-25 14:16:47 +09:00
Jorge Bucaran
d3d3652869 Bump to 2.1.9 📦 2016-04-24 15:25:52 +09:00
Jorge Bucaran
3dedb4d42d Do not flush fishfile if user types `fisher install`. Close #218. 2016-04-24 15:25:52 +09:00
Jorge Bucaran
c2a7535eb3 Simplify FAQ more, no one is asking those questions. 2016-04-24 02:27:13 +09:00
Jorge Bucaran
0b340dc852 Fix inaccurate post uninstall message again. 2016-04-24 02:09:46 +09:00
Jorge Bucaran
6bf39721aa Fix inaccurate post uninstall message. 2016-04-24 02:07:45 +09:00
Jorge Bucaran
04884301d0 Drop risky exec fish < /dev/tty for `npm i fisherman`
in favor of displaying a message and ask the user to
reload their shell.
2016-04-24 01:55:38 +09:00
Jorge Bucaran
65a7055d02 Add uninstall instructions, update docs. 2016-04-24 01:33:34 +09:00
Jorge Bucaran
45ea333ec3 Better user experience for `npm i fisherman` users. 2016-04-24 00:59:06 +09:00
Jorge Bucaran
619b164f31 Bump to 2.1.1 2016-04-23 22:28:40 +09:00
Jorge Bucaran
7615ed882b Bump to 2.1.0 2016-04-23 22:20:53 +09:00
Jorge Bucaran
d7fe153965 Do not self-destroy on a global setup. 2016-04-23 22:20:53 +09:00
Jorge Bucaran
7feb782a40 Underline url links in manpage. 2016-04-23 15:51:16 +09:00
Jorge Bucaran
f9ffc25f2e Remove repeated definition from manpage. 2016-04-23 15:47:58 +09:00
Jorge Bucaran
58813f7d1a Reword FAQ#1 question. 2016-04-23 15:46:57 +09:00
Jorge Bucaran
10b72f8617 Remove another useless question from FAQ. 2016-04-23 15:44:15 +09:00
Jorge Bucaran
04b233e3c7 Don't force fisherman down your throat.
Remove ``Why fisherman?`` from FAQ. It adds little value
since the README is already very clear about what are
fisherman's pros.
2016-04-23 15:33:09 +09:00
Jorge Bucaran
3f91389b39 Sync manpage with FAQ updates. 2016-04-23 15:29:16 +09:00
Jorge Bucaran
e342e46636 Remove underline style in message after update. 2016-04-23 00:49:35 +09:00
Jorge Bucaran
6c890c1345 Silence fisherman in quiet mode when inside async installs/updates. 2016-04-22 23:34:27 +09:00
Jorge Bucaran
1cd51a63f7 Bump to 2.0.0
* Remove "beta" tag from version.
* Fix bug from typo in params list in __fisher_help.
* Colorless output when fisherman is already up to date.
2016-04-22 21:27:37 +09:00
Jorge Bucaran
416f4d7238 Ahoy my mateys! fisherman 2.0.0 (beta) is here.
A lot has changed, in fact, fisherman as you knew it, is
no longer with us. Let me explain. The new fisherman, is
in fact a rewired clone of ``fin´´, a short-lived 2 week
experiment that started because it was easier to rewrite
everything than moving fisherman forward.

Let me explain. I was longing for a lightweight, simpler
fisherman with minimal maintanance cost. This fin lad is
one of the most pragmatic pieces of code I've ever written,
but attempting to maintain two drastically different plugin
managers was not a sane decision. fin's goal was to get out
of my way and let me be productive with fish and it did.

Now fin is fisherman and fisherman is fin. The most notable
change is that fisherman no longer depends on an index, so
like fin, it's neutral and agnostic to what plugins you use.

No index means fisherman completions are no longer as clever
as to show you description of plugins, but you will still get
enough information to know whether the plugin is a theme or not.

I hope you always check the plugin's README / online docs before
installing anything anyway.

With the index gone, we had no use for ``search``, so this command
is also gone.

If you were using search often or depended on the removed features
above, I am afraid they are gone *gone*, but trust me it's all for
the very best.

Now, with this out of the way, it's all unicorns and dartfish. Almost.

To upgrade to fisherman 2.0.0 you need to REMOVE your current version
 of fisherman:

1. ```rm -rf "$fisher_home" "$fisher_config"```
2. Open your config.fish and remove the fisherman initialization code.
3. ```exec fish < /dev/tty``` to reload the session.
4. Run `curl -Lo ~/.config/fish/functions/fisher.fish --create-dirs git.io/fisherman`

That's it. Probably.

The new fisherman brings a lot more stability and maturity to the
project and we need this change in order to move forward. I will
be actively fixing any bugs that may have sneaked in during the
```fin->fisherman``` rewiring, but please do ping me:

@bucaran on GitHub or directly to my email j@bucaran.me

if you find anything out of place. Feel free and invited to  go
wild with issues in order to get this into shape ASAP.

Cheers!
2016-04-22 00:34:06 +09:00