Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/halostatue/fish-brew

Homebrew utility functions for Fish
https://github.com/halostatue/fish-brew

fish fish-plugin fish-shell fisher homebrew

Last synced: 2 months ago
JSON representation

Homebrew utility functions for Fish

Awesome Lists containing this project

README

        

# halostatue/fish-brew

[![Version][]](https://github.com/halostatue/fish-brew/releases)

Configuration and utilities for [Homebrew][] in the [fish shell][].

## Installation

Install with [Fisher][] (recommended):

```fish
fisher install halostatue/[email protected]
```

### System Requirements

- [fish][] 3.2+
- [Homebrew][]

## Startup Configuration (conf.d)

Adds Homebrew paths to `$PATH`. This uses the `fish_add_path` function included
with Fish 3.2. This is not set in `$fish_user_paths` because the correct order
for Homebrew paths is:

- `(brew --prefix)/bin`
- `/usr/local/bin`
- `/usr/bin`
- `/bin`
- `(brew --prefix)/sbin`
- `/usr/local/sbin`
- `/usr/sbin`
- `/sbin`

If `(brew --prefix)/bin` and `(brew --prefix)/sbin` are placed in
`$fish_user_paths`, then `(brew --prefix)/sbin` would end up being placed
_before_ `/usr/bin`, which might result in odd behaviours.

If Homebrew is installed into `~/.brew`, this will be detected.

If `$HOME/.config/brew/config.fish` exists, it will be sourced during
initialization. This allows the loading of configuration values like
`$HOMEBREW_GITHUB_API_TOKEN`. See the `brew` discussion on [Environment][] for
more details.

## Functions

### has_keg

```fish
has_keg openssl
```

Returns true if the named keg is installed. Previously known as `has:keg`.

### has_cask

```fish
has_cask macvim
```

Returns true if the named cask is installed. Previously known as `has:cask`.

## Licence

[MIT](./LICENCE.md)

## Change Log

[CHANGELOG](./CHANGELOG.md)

## Contributing

- [Contributing](./CONTRIBUTING.md)
- [Contributors](./CONTRIBUTORS.md)
- [Code of Conduct](./CODE_OF_CONDUCT.md)

[homebrew]: https://brew.sh
[fish shell]: https://fishshell.com 'friendly interactive shell'
[version]: https://img.shields.io/github/tag/halostatue/fish-brew.svg?label=Version
[fisher]: https://github.com/jorgebucaran/fisher
[fish]: https://github.com/fish-shell/fish-shell
[environment]: https://docs.brew.sh/Manpage#environment