feat(revamp): add zsh and neovim configs, add an install script and a dependencies list
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
# Homebrew
|
||||
|
||||
Defines Homebrew specific environment variables and aliases.
|
||||
|
||||
## Variables
|
||||
|
||||
Execute the following to list the environment variables loaded in the shell:
|
||||
|
||||
```sh
|
||||
brew shellenv
|
||||
```
|
||||
|
||||
## Aliases
|
||||
|
||||
Aliases are enabled by default. To disable them, add the following to
|
||||
_`${ZDOTDIR:-$HOME}/.zpreztorc`_.
|
||||
|
||||
```sh
|
||||
zstyle ':prezto:module:homebrew:alias' skip 'yes'
|
||||
```
|
||||
|
||||
### Homebrew Core
|
||||
|
||||
- `brewc` cleans outdated brews and their cached archives.
|
||||
- `brewi` installs a formula.
|
||||
- `brewL` lists installed formulae that are not dependencies of another
|
||||
installed formula.
|
||||
- `brewl` lists installed formulae.
|
||||
- `brewo` lists brews which have an update available.
|
||||
- `brews` searches for a formula.
|
||||
- `brewu` upgrades outdated formulae.
|
||||
- `brewx` uninstalls a formula.
|
||||
|
||||
### Homebrew Cask
|
||||
|
||||
- `caski` installs a cask.
|
||||
- `caskl` lists installed casks.
|
||||
- `casko` lists casks which have an update available.
|
||||
- `casks` searches for a cask.
|
||||
- `casku` upgrades outdated casks.
|
||||
- `caskx` uninstalls a cask.
|
||||
|
||||
## Authors
|
||||
|
||||
_The authors of this module should be contacted via the [issue tracker][1]._
|
||||
|
||||
- [Sorin Ionescu](https://github.com/sorin-ionescu)
|
||||
- [Griffin Yourick](https://github.com/tough-griff)
|
||||
|
||||
[1]: https://github.com/sorin-ionescu/prezto/issues
|
||||
@@ -0,0 +1,59 @@
|
||||
#
|
||||
# Defines Homebrew aliases.
|
||||
#
|
||||
# Authors:
|
||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||
#
|
||||
|
||||
# Load dependencies.
|
||||
pmodload 'helper'
|
||||
|
||||
# Return if requirements are not found.
|
||||
if ! is-darwin && ! is-linux; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
#
|
||||
# Variables
|
||||
#
|
||||
|
||||
# Load standard Homebrew shellenv into the shell session.
|
||||
# Load 'HOMEBREW_' prefixed variables only. Avoid loading 'PATH' related
|
||||
# variables as they are already handled in standard zsh configuration.
|
||||
if (( $+commands[brew] )); then
|
||||
cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/brew-shellenv-cache.zsh"
|
||||
if [[ "$commands[brew]" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
mkdir -p "$cache_file:h"
|
||||
# Cache the result.
|
||||
echo "${(@M)${(f)"$(brew shellenv 2> /dev/null)"}:#export HOMEBREW*}" >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
||||
source "$cache_file"
|
||||
unset cache_file
|
||||
fi
|
||||
|
||||
#
|
||||
# Aliases
|
||||
#
|
||||
|
||||
# Homebrew
|
||||
if ! zstyle -t ':prezto:module:homebrew:alias' skip; then
|
||||
alias brewc='brew cleanup'
|
||||
alias brewi='brew install'
|
||||
alias brewL='brew leaves'
|
||||
alias brewl='brew list'
|
||||
alias brewo='brew outdated'
|
||||
alias brews='brew search'
|
||||
alias brewu='brew upgrade'
|
||||
alias brewx='brew uninstall'
|
||||
|
||||
# Homebrew Cask
|
||||
alias caski='brew install --cask'
|
||||
alias caskl='brew list --cask'
|
||||
alias casko='brew outdated --cask'
|
||||
alias casks='brew search --cask'
|
||||
alias casku='brew upgrade --cask'
|
||||
alias caskx='brew uninstall --cask'
|
||||
fi
|
||||
Reference in New Issue
Block a user