Commit graph

341 commits

Author SHA1 Message Date
James Smith 3decc8e468
Migrate Data to Proper XDG Directory (#571)
Going by the XDG base directory specification, it makes more sense to
place fisher data in XDG_DATA_HOME rather than XDG_CONFIG_HOME.
2020-07-01 12:30:16 +09:00
Jorge Bucaran 017046abf3
3.2.11
https://github.com/jorgebucaran/fisher/releases/tag/3.2.11
2020-05-23 01:39:50 +09:00
Andrei Borisov 44405ca9c4
Fix _fisher_parse function for BusyBox awk (#566) 2020-05-23 01:37:54 +09:00
Jorge Bucaran c142f61e51
3.2.10 2019-11-16 01:38:00 +09:00
mattmc3 25ae8be214 Better fishfile location support (#547)
* Better fishfile location support

Per issue #545, support fishfile living in $fish_config even when $fisher_path is set if desired.

* Re-home fishfile to $fish_config/fishfile

Per discussion here:
https://github.com/jorgebucaran/fisher/pull/547
https://github.com/jorgebucaran/fisher/issues/545

Fish file is returned from $fisher_path/fishfile to $fish_config/fishfile.

* Change $fishfile to global variable
2019-11-09 12:06:43 +09:00
Jorge Bucaran ae37295f81
3.2.9 2019-04-17 02:32:18 +09:00
Jorge Bucaran 8b5a422999
Trim https:// before github.com/ in _fisher_fmt 2019-04-17 02:32:04 +09:00
Jorge Bucaran 0b1f270361
3.2.8 2019-03-06 12:20:23 +09:00
AppleTheGolden c66a1db768
Ignore curl write out vars from your .curlrc (#530) 2019-03-06 12:17:11 +09:00
Jorge Bucaran b2cd7aee3a
3.2.7 2019-01-30 03:36:34 +09:00
Jorge Bucaran c7472b2961
fix: don't hang if there are jobs in the bg; close #523 2019-01-30 03:33:03 +09:00
Jorge Bucaran ae878a8e9c
refactor: indent stream redirections properly 2019-01-23 00:53:51 +09:00
Jorge Bucaran 9a23976473
3.2.6 2019-01-22 20:36:46 +09:00
Jorge Bucaran 49c3eabf9f
refactor: rename some internal variables 2019-01-22 20:26:48 +09:00
Jorge Bucaran 37a6cd28e3
refactor: rename help,version to --{help,version} 2019-01-22 18:54:16 +09:00
Jorge Bucaran e11cd69f17
refactor: embed version echo to argv switch 2019-01-22 18:29:59 +09:00
Jorge Bucaran 5ddafed654
refactor: don't read entire fisher.fish to get version 2019-01-22 18:24:07 +09:00
Jorge Bucaran 91417201f4
fix: refactor parallel fetch; close #518
- Resolve circular dependencies for local packages
  - Integrate _fisher_deps functionality to _fisher_fetch
- Update _fisher_jobs to exit with status 1 if there are no jobs
- Use `set -q myvar[1]` instead of `test -z $myvar` where possible
2019-01-22 17:58:42 +09:00
Jorge Bucaran db82938731
fix: sed regexes; bug introduced with fe1cc9805 2019-01-22 10:13:32 +09:00
Jorge Bucaran 12ee3cb33e
refactor: remove _fisher_wait function; use inline solution
To be eventually replaced by the `wait` builtin.
2019-01-21 20:51:25 +09:00
Jorge Bucaran 972eed7aa8
refactor: simplify _fisher_add and _fisher_rm code 2019-01-21 20:50:23 +09:00
Jorge Bucaran 632917c7d2
fix: show packages installed from a branch/tag in fisher ls 2019-01-21 20:04:56 +09:00
Jorge Bucaran 8a99865be5
refactor: consume empty lines in fishfile 2019-01-21 20:02:25 +09:00
Jorge Bucaran 3a13ba9d68
feat: allow inline comments in fishfile 2019-01-21 19:29:25 +09:00
Jorge Bucaran 975aa989c9
refactor: rename _fisher_diff to _fisher_parse 2019-01-21 16:56:29 +09:00
Jorge Bucaran fe1cc9805c
refactor: make $HOME to `~' sed regex stricter 2019-01-21 16:36:55 +09:00
Jorge Bucaran 8cb6692785
fix: add local packages to fishfile 2019-01-21 16:03:06 +09:00
Jorge Bucaran 61f679e6a3
fix: if inside a local package, allow installing with: . or ./; close #513 2019-01-21 15:36:30 +09:00
Jorge Bucaran 6401d18504
3.2.5
- ci: use && (tears of joy)
- docs: better explore package directions
- refactor: add license info to README; remove LICENSE file
- refactor `fisher ls REGEX`
- refactor: merge fishfile read/write parser to one script
- refactor: take advantage of nullglob in for loops
- refactor: prepend "fisher:" to error messages to improve logging
- refactor: remove unnecessary message after self-uninstall
- refactor: rename `fisher self-complete` to `fisher complete`
- refactor: simplify status report format script
2019-01-21 02:51:34 +09:00
Stefan Maric 1211e0bafa fix: override fishfile content instead of replacing the file
This allows fishfile to be a symlink, which I used to keep track of my
dotfiles in a repo, and broke after upgrading to V3.
2019-01-18 15:30:45 +01:00
Jorge Bucaran f1766dcfa0
refactor: automate erasing variables in uninstall 2019-01-12 19:10:14 +09:00
Jorge Bucaran d1e49f8d9a
3.2.4 2019-01-12 18:49:22 +09:00
Jorge Bucaran 78c0852162
feat: filter ls output using a regular expression; close #512 2019-01-12 18:49:03 +09:00
Jorge Bucaran 12661c592f
fix: ls should show only user installed packages; close #511 2019-01-12 18:19:28 +09:00
Jorge Bucaran 03bfe5ed2a
3.2.3 2019-01-12 13:46:19 +09:00
Jorge Bucaran 14c740d1d6
docs: move legacy fish support guide to issues; #510 2019-01-12 13:46:01 +09:00
Jorge Bucaran fbfc7c04f3
refactor: improve fisher rm completions
For tab completions we want to list only the packages that you
added yourself (via the CLI or fishfile) and ignore those that
are installed but are dependencies of another package/s.
2019-01-12 12:46:37 +09:00
Jorge Bucaran 5cb9b3d7ea
refactor: keep break on the same line 2019-01-12 11:24:54 +09:00
Jorge Bucaran 076e12db1a
refactor: for consistency, don't use builtin jobs, just jobs 2019-01-12 11:23:44 +09:00
Jorge Bucaran 37335526dc
refactor: date +%s%3N should work on Linux (or print only seconds) 2019-01-12 11:22:45 +09:00
Jorge Bucaran e1469e5a39
fix: use same path for other *BSDs in _fisher_now 2019-01-12 11:01:00 +09:00
Jorge Bucaran fff873955a
fix: print result even if t1-t0 equals 0; close #508 2019-01-12 10:59:54 +09:00
Jorge Bucaran 37c9d70674
refactor: improve awk script readability in _fisher_fetch 2019-01-11 21:22:32 +09:00
Jorge Bucaran 23462edfd0
refactor: improve fishfile read field sep regex 2019-01-11 16:44:24 +09:00
Jorge Bucaran 9293e8b3b7
refactor: improve jobs regex 2019-01-11 11:10:53 +09:00
Jorge Bucaran 6990b81599
refactor: use -e flag for consistency 2019-01-05 01:46:17 +09:00
Jorge Bucaran 7140368155
refactor: remove extraneous argument 2019-01-05 01:45:43 +09:00
Jorge Bucaran 79b2f21662
3.2.2 2019-01-03 09:48:05 +09:00
Jorge Bucaran 64a812e90e
bug: fix name format regex; close #506 2019-01-03 09:47:41 +09:00
Jorge Bucaran 78f35610ca
3.2.1 2019-01-01 14:52:10 +09:00
Jorge Bucaran 49785a134b
fix: don't create cache directory before fetching 2019-01-01 14:52:00 +09:00
Jorge Bucaran 39e9f3f340
3.2.0
- Optimize startup path #494
  - Cuts fisher-related startup time to roughly 25ms
  - Reduce legacy fish support (~~>=2.0~~ >=2.1)
- Read fishfile from `$fisher_path` instead of `$fish_config` #480, #479
- Don't add invalid packages to fishfile / validate fishfile #478 #484 #492
- Rewrite tar expansion logic / don't use `--strip-components` #489 #496
  - Better OpenBSD support
  - Better msys2 on Windows 10 support
- Create symbolic links of original files when adding local packages #502
2019-01-01 02:49:03 +09:00
Sefa Eyeoglu d65b86487b
Read fishfile from $fisher_path instead of $fish_config (#480) 2019-01-01 02:45:19 +09:00
Bjorn Neergaard 6e5a751e16
Optimize fisher startup path (#494)
* With the addition of keybinding support for fish 2.x, fisher greatly
increases shell startup time (50-100ms in my testing). This is due to a
number of reasons, including using less-than-ideal builtins,
unconditionally running mkdir, unconditionally recreating
conf.d/fisher.fish, and checking for curl on startup (instead of when
curl is used).

* This patch cuts fisher-related startup time to roughly 25ms, simplifying
the code paths as much as I am able.

* The source function is removed as a compromise for speed. Fish 2.1 and
greater support `source`, and supporting fish 2.0 is not worth a hefty
speed penalty in my opinion.

* Remove curl checks, invert version logic.

* Update README to reflect fish 2.1+ requirement
2019-01-01 02:45:19 +09:00
Jorge Bucaran 2d6b6a1926
feature: don't add invalid packages to fishfile; fix #484 2019-01-01 02:44:20 +09:00
Jorge Bucaran e9925f4a96
3.1.1 2018-10-21 23:34:28 +09:00
Jorge Bucaran d653e0e0e9
refactor: improve readability / indentation 2018-10-21 23:32:13 +09:00
Jorge Bucaran 71974a2527
feat: show error if package being removed is not found; close #478 2018-10-21 23:31:16 +09:00
Jorge Bucaran 2be2ea6109
refactor: rename seen→seen_pkgs 2018-10-21 23:28:25 +09:00
Jorge Bucaran aff893c05b
refactor: change regex to remove everything before a ***github.com/foo/bar 2018-10-21 22:33:59 +09:00
Jorge Bucaran ddf7334854
3.1.0 2018-10-17 15:57:46 +09:00
Jorge Bucaran c9974efc12
feat: add user key bindings autoloading for legacy fish
Packages add key bindings via configuration snippets. As it turns out,
configuration snippets are not available  in legacy fish and only fish
3.0 or newer can use the bind builtin on shell startup.

To support  packages that add key  bindings in legacy fish,  we make a
copy  of  the  user's  fish_user_key_bindings function  (if  there  it
exists)  and create  a new  one that  when called,  will source  every
*_key_bindings.fish  inside \$fisher_path/conf.d  and finally  run our
copy of the  user's fish_user_key_bindings, if it  exists, to preserve
any user defined key bindings.

To be able to  run code on shell startup we  create a fisher.fish file
inside \$fisher_path/conf.d if running an  older version of fish. When
the user  upgrades to  a supported  fish version,  we'll automatically
remove this file.
2018-10-17 15:51:12 +09:00
Jorge Bucaran 207ccf00b6
refactor: add more info to help command
Command line usage help now tells you that running fisher will
update installed packages. Running fisher also commits fishfile
changes, but I couldn't fit all the words on the same line.
2018-10-16 14:36:57 +09:00
Jorge Bucaran 76bb67b9c6
fix: use command 2018-10-14 02:55:42 +09:00
Jorge Bucaran 24e9154688
refactor: function, var names & spacing
- _fisher_fishfile_load→_fisher_fishfile_read
2018-10-14 02:21:39 +09:00
Jorge Bucaran 77fc030c03
feat: copy files from sub directories; close #468
Supporting nested directories is an anti-feature. It exists only
so that we can install certain packages that are structured that
way. All functions will share the same scope and location.
2018-10-14 00:57:22 +09:00
Jorge Bucaran 8d3e4d367e
fix: normalize package id in fishfile format script 2018-10-13 14:42:48 +09:00
Jorge Bucaran 45e556ab18
3.0.9 2018-10-13 02:41:14 +09:00
Jorge Bucaran 4d953fa72e
feat: custom hosted packages via ssh+git; fix #464
Use git to install packages hosted in a custom server
via ssh using a URL like: owner@host.xz:path/to/repo
2018-10-13 02:24:53 +09:00
Jorge Bucaran da792f6887
style: improve package fetch error message 2018-10-13 01:12:43 +09:00
Jorge Bucaran 44ec48b472
refactor: use id to refer to package name specifier, not name 2018-10-13 01:09:16 +09:00
Jorge Bucaran 993b471777
refactor: improve readability of status report generator 2018-10-13 00:37:24 +09:00
Jorge Bucaran 32dbf148bb
refactor: improve fishfile formatter normalize regex 2018-10-13 00:28:50 +09:00
Jorge Bucaran 55b543eb13
fix: display correct time on Linux; close #463 2018-10-12 23:08:05 +09:00
Joe George 28aaa277e0 fix: don't strip github.com from local paths; fix #472 2018-10-11 00:41:44 +09:00
Michiel Scholten 1d82bee9c2 fix: replace ln with cp; don't hardlink; close #470 2018-10-10 23:53:40 +09:00
Jorge Bucaran 68e4ee631f
3.0.8 2018-10-08 14:29:41 +09:00
Jorge Bucaran 23379887c0
refactor: simplify builtin jobs parse script 2018-10-08 14:24:31 +09:00
Jorge Bucaran 2e933cad31
fix: use $__fish_data_dir if available 2018-10-08 13:32:57 +09:00
Jorge Bucaran 203e9d4d69
refactor: remove magic number 2018-10-08 13:31:31 +09:00
Jorge Bucaran 0898825301
3.0.7 2018-10-08 10:51:28 +09:00
Jorge Bucaran f75de3aa87
fix: don't create new fishfile (except the first time); fix #460 2018-10-08 10:50:04 +09:00
Jorge Bucaran 4e7c9e000b
fix: don't expect https:// to start lines in fishfile 2018-10-08 10:23:44 +09:00
Jorge Bucaran 2549ac1f4b
fix: make trailing / optional in \$fisher_config; close #462
$fisher_config/foo/bar  → foo/bar
{$fisher_config}foo/bar → foo/bar
$fisher_config//foo/bar → foo/bar
2018-10-08 09:36:45 +09:00
Jorge Bucaran c7765222e5
refactor: use basename to remove path refix more reliably; fix #462 2018-10-08 09:32:37 +09:00
Jorge Bucaran 785fa47870
3.0.6 2018-10-07 13:36:24 +09:00
Jorge Bucaran 73505e74cb
fix: use real target if fishfile is a symbolic link; close #460 2018-10-07 13:34:42 +09:00
Jorge Bucaran 2a6c36b8a9
fix: use string check to determine if filename is a fish file; fix #459
Bug was introduced in 7850f78e8a.

When removing a file don't use `functions -q $filename` as a loose
check for a .fish file. Use a string match instead.

`functions -q $filename` will cause the function defined in the file
to be autoloaded (if it wasn't already) which can cause trouble with
some "dubious" packages that run arbitrary code in function files.
2018-10-07 12:53:46 +09:00
Jorge Bucaran 60d3c4c9c3
3.0.5 2018-10-07 02:37:46 +09:00
Jorge Bucaran 94801fb177
fix: don't fetch a pkg you already fetched 2018-10-07 02:37:30 +09:00
Jorge Bucaran 3e0bca9e47
refactor: better error msg when trying to install pkg without a prefix 2018-10-07 02:24:55 +09:00
Jorge Bucaran 543e97d6c7
3.0.4 2018-10-07 02:19:18 +09:00
Jorge Bucaran d7b9cd526d
fix: use perl for epoch only on FreeBSD & Darwin; fix #458 2018-10-07 02:18:46 +09:00
Jorge Bucaran 7850f78e8a
feat: copy non fish files to $fisher_path; close #456 2018-10-07 02:17:09 +09:00
Jorge Bucaran 2ead99f732
refactor: improve commit error msg when fishfile is not empty 2018-10-07 00:54:00 +09:00
Jorge Bucaran 8f42f7abdf
refactor: dry self-uninstall; add farewell message 2018-10-06 12:01:20 +09:00
Jorge Bucaran 6d796516d9
3.0.3 2018-10-06 08:20:25 +09:00
Jorge Bucaran 13eba771ee
fix: prevent failglob error when $fisher_config is empty; close #455
fish-shell/fish-shell#2719
fish-shell/fish-shell#4175
2018-10-06 08:19:46 +09:00
Jorge Bucaran 5bf5c8da4c
3.0.2 2018-10-06 02:58:14 +09:00
Jorge Bucaran 1bd12771e7
don't try to install a package from an invalid specifier; fix #454 2018-10-06 02:57:57 +09:00