Compare commits
6 commits
d2e6e2f3aa
...
651b4ae517
| Author | SHA1 | Date | |
|---|---|---|---|
| 651b4ae517 | |||
| 89e3f7f93a | |||
| 7a3921ad91 | |||
| f726ccc185 | |||
| 73ee5d18d6 | |||
| 80a448072d |
3 changed files with 27 additions and 18 deletions
|
|
@ -1,12 +0,0 @@
|
||||||
#! zsh
|
|
||||||
_direnv_hook() {
|
|
||||||
trap -- '' SIGINT
|
|
||||||
emulate zsh -c "$(direnv export zsh)"
|
|
||||||
trap - SIGINT
|
|
||||||
}
|
|
||||||
|
|
||||||
typeset -ag precmd_functions chpwd_functions
|
|
||||||
if (( $+commands[direnv] )); then
|
|
||||||
[[ -z ${precmd_functions[(r)_direnv_hook]} ]] && precmd_functions+=(_direnv_hook)
|
|
||||||
[[ -z ${chpwd_functions[(r)_direnv_hook]} ]] && chpwd_functions+=(_direnv_hook)
|
|
||||||
fi
|
|
||||||
|
|
@ -1,2 +0,0 @@
|
||||||
#! zsh
|
|
||||||
eval "$(zoxide init zsh)"
|
|
||||||
|
|
@ -1,3 +1,21 @@
|
||||||
|
# Rather than writing eval "$(something init)" and having it called on every
|
||||||
|
# shell initialisation, zeval will use Zim's --on-pull hook to run the command
|
||||||
|
# once and cache the output, as well as zcompile it. Pass a descriptive, unique
|
||||||
|
# name as the first argument and the Zsh command you'd normally write inside
|
||||||
|
# $() as the second. For example, to hook Direnv into your shell:
|
||||||
|
# zeval direnv 'direnv hook zsh'
|
||||||
|
zeval() {
|
||||||
|
zmodule https://git.00dani.me/00dani/null --name zeval-$1 --on-pull "$2 >! init.zsh"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Hook a command into Zsh, only if that command is installed. Pass the
|
||||||
|
# command's name as the first argument and the commandline you want to evaluate
|
||||||
|
# as the second. Works in the same way as zeval, but silently omits the module
|
||||||
|
# from your setup if the necessary command is not installed.
|
||||||
|
zeval-if-installed() {
|
||||||
|
(( ${+commands[$1]} )) && zeval "$@"
|
||||||
|
}
|
||||||
|
|
||||||
zmodule willghatch/zsh-saneopt --source saneopt.plugin.zsh
|
zmodule willghatch/zsh-saneopt --source saneopt.plugin.zsh
|
||||||
zmodule environment
|
zmodule environment
|
||||||
|
|
||||||
|
|
@ -5,25 +23,30 @@ zmodule mafredri/zsh-async --source async.zsh
|
||||||
|
|
||||||
zmodule input
|
zmodule input
|
||||||
zmodule run-help
|
zmodule run-help
|
||||||
zmodule magic-enter
|
|
||||||
zmodule termtitle
|
zmodule termtitle
|
||||||
zmodule utility
|
zmodule utility
|
||||||
|
|
||||||
zmodule romkatv/powerlevel10k --use degit
|
zmodule romkatv/powerlevel10k --use degit
|
||||||
zmodule ryanccn/vivid-zsh --cmd 'vivid_theme=molokai source {}/vivid-zsh.plugin.zsh' --on-pull '(( ${+commands[vivid]} )) && ./build.sh'
|
zeval-if-installed vivid 'echo export LS_COLORS=${(qqq)"$(vivid generate molokai)"}'
|
||||||
|
|
||||||
zmodule hlissner/zsh-autopair
|
zmodule hlissner/zsh-autopair
|
||||||
zmodule mollifier/cd-gitroot --fpath . --autoload cd-gitroot
|
zmodule mollifier/cd-gitroot --fpath . --autoload cd-gitroot
|
||||||
zmodule kiesman99/zim-zoxide
|
|
||||||
zmodule zsh-users/zsh-autosuggestions
|
zmodule zsh-users/zsh-autosuggestions
|
||||||
|
|
||||||
(( ${+commands[brew]} )) && zmodule homebrew
|
(( ${+commands[brew]} )) && zmodule homebrew
|
||||||
|
zeval-if-installed direnv 'direnv hook zsh'
|
||||||
|
zeval-if-installed scmpuff 'scmpuff init --shell=zsh'
|
||||||
|
|
||||||
# Additional completion definitions for Zsh.
|
# Additional completion definitions for Zsh.
|
||||||
zmodule zsh-users/zsh-completions --fpath src
|
zmodule zsh-users/zsh-completions --fpath src
|
||||||
# Enables and configures smart and extensive tab completion.
|
# Enables and configures smart and extensive tab completion.
|
||||||
# completion *must* be sourced after all modules that add completion definitions.
|
# completion *must* be sourced after all modules that add completion definitions to fpath.
|
||||||
zmodule completion
|
zmodule completion
|
||||||
|
|
||||||
|
# Initialise Zoxide after compinit, because it calls compdef if available.
|
||||||
|
zeval-if-installed zoxide 'zoxide init zsh'
|
||||||
|
|
||||||
# Fish-style syntax highlighting as you type, making the Zsh experience much more friendly!
|
# Fish-style syntax highlighting as you type, making the Zsh experience much more friendly!
|
||||||
zmodule zdharma-continuum/fast-syntax-highlighting
|
zmodule zdharma-continuum/fast-syntax-highlighting
|
||||||
|
|
||||||
|
unfunction zeval zeval-if-installed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue