- 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
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.
- 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
* 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
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.
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.
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.
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.
- create fishfile if one doesn't already exist
- only read from stdin when using `add` or `rm` commands
- show help if unknown command is entered
- show error message when fishfile is empty and no packages
were added, removed or updated
SUMMARY
This PR rewrites fisher from the ground up and adds new
documentation. It introduces some breaking changes as described
in the next section. For a historical background of this work
see the original V3 proposal #307 and the more recent discussion
about the future of the project #443.
After much debate and careful consideration I decided it is in
the best interest of the project to keep the CLI-based approach
to dependency management as a facade to the fishfile-based
approach originally proposed.
The new `add` commands (previously `install`) and good ol' `rm`
interactively update your fishfile and commit all your changes
in one sweep. To the end user, it's as if you were adding or
removing packages like you already do now. Internally, these
commands affect how the fishfile is parsed and result in adding
new or replacing/removing existing entries followed by a regular
`fisher` run.
INSTALLING
- `install` has been renamed to `add`
- Installing from a gist is no longer supported (but it will be
back in a future release—removed only to simplify the rewrite)
- To install a package from a tag or branch use an at symbol
`@`—the colon `:` is deprecated
LISTING
- `ls` and `rm` are still available with a few minor differences
- `ls` followed by a package name does not list specific package
information (may be added back in a future release)
- `ls` output format no longer displays a legend to indicate
whether a package is a theme or a local package; now it's a flat
dump of every installed package specifier
- For local packages the full path is shown instead
- I want to add a `--tree` option in to display packages in a
tree-like format in the future
- `ls-remote` has been removed as there is no longer a preferred
organization to look for packages— there is no plan to add it
back
UPDATING
- A new `self-update` command has been introduced to update
fisher itself
- fisher will be only updated when a new version is actually
available
- `update` has been removed
- Everything is installed from scratch everytime you add or
remove something, so there is no need to update specific
packages—you're always up-to-date
- To lock on a specific package version install from a
tag/branch, e.g., `mypkg/foobar@1.3.2`
UNINSTALLING
- `self-uninstall` works as usual
HELP & VERSION
- `help` only displays fisher usage help
- help is dumped to stdout instead of creating a man page on the
fly and piping it to your pager `version` works as usual
ENVIRONMENT
- `$fish_path` been renamed to `$fisher_path` to make it clear
that this is a fisher specific extension, not your shell's
ECOSYSTEM
- Oh My Fish! packages are still supported, albeit less
attention is paid to them
- Some packages that use Oh My Fish! specific environment
variables or events might not work
- Most of Oh My Fish! extensions are no longer necessary since
fish 2.3, therefore it should be a simple matter to upgrade them
to modern fish
DEPENDENCIES
- fisher can now run on fish 2.0
- It's a good idea to upgrade to at least fish 2.3 to use the
string builtin and configuration snippets, but there's no reason
for fisher to force you to use any fish version
- `curl` is required for fetching packages
- I am considering adding a fallback to `wget` if `curl` is not
available on your system
- `git` is optional
- V3 fetches packages directly from github, gitlab and
bitbucket, if you are using them
- git is only used (implementation still wip) if you want to
install a package from an unknown git host like your own git
server
The awk json parsing routine was setting a variable of "description"
instead of "info". This was causing a problem where the cached index -
and subsequently ls-remote commands - to show the "%info" format item as
the URL again.
* Ensure fisherman's completions are placed in the correct fisherman directory when running self update.
* Update documentation to include the extra steps required when setting fish_path.
* -U instead of -g in README.
Fisherman was always writing its completion file to $fish_config/completions.
This was incorrect behavior if $fish_path was set to a directory other than
$fish_config (its default).
Note that when using $fish_path to manage functions, completions and snippets,
you opt out fish default locations which are handled for you by the shell and
consequently are responsible for appending your custom $fish_path/functions
and $fish_path/completions directories to $fish_function_path and $fish_complete_path respectively, as well as sourcing snippets (.fish files under $fish_path/conf.d) on shell
startup.
- `__fisher_log` doesn't work on <2.2.0 anymore so use `echo` instead
- `command -s` option not available on macOS, so use `type` instead
- `type -q` not available on fish <2.2.0,use `type brew >/dev/null 2>&1`
- `brew up` not needed anymore, it auto updates now
- `brew --HEAD` not needed, latest version is enough