Use site-functions directory for all zsh plugins

This commit is contained in:
Eric Torres 2019-03-01 15:59:17 -08:00
parent fc101fb30b
commit 13257f07e6
10 changed files with 55 additions and 24 deletions

View File

@ -1,7 +1,6 @@
#compdef cptemplate
# zsh completions for 'cptemplate'
# automatically generated with http://github.com/RobSis/zsh-completion-generator
# ========== Completions ==========
local arguments
arguments=(

View File

@ -1,7 +1,6 @@
#compdef dlaudio
# zsh completions for 'dlaudio'
# automatically generated with http://github.com/RobSis/zsh-completion-generator
local arguments
arguments=(

32
zsh/_fedit Normal file
View File

@ -0,0 +1,32 @@
#compdef fedit
# Fuzzy find a file and then edit it
# ========== Shortcuts ==========
_fedit() {
/usr/bin/fedit
}
_etcedit() {
/usr/bin/fedit --etc
}
zle -N fedit
bindkey -M viins '^o' _fedit
zle -N _etcedit
bindkey -M viins '^e' _etcedit
# ========== Completions ==========
local arguments
arguments=(
$argument_list
{-h, --help}'[show this help message and exit]'
{-b, --boot}'[edit a file in /boot]'
{-d, --dir}'[edit a file in a given directory]'
{-E, --etc}'[edit a file in /etc]'
{-e, --editor}'[use a given editor]'
'*:filename:_files'
)
_arguments -s $arguments

View File

@ -1,4 +1,6 @@
# key bindings for fless script
#compdef fless
# ========== Shortcuts ==========
fless() {
/usr/bin/fless
}

View File

@ -1,7 +1,10 @@
#compdef fcd
# Fuzzy cd from anywhere
# Dependencies
# - fzf
# - mlocate
# * fzf
# * mlocate
# ========== Shortcuts ==========
cf() {
[[ -z "${*}" ]] && return 1
[[ ! -x /usr/bin/fzf ]] && return 1
@ -18,3 +21,13 @@ cf() {
}
autoload -Uz cf
# ========== Completions ==========
local arguments
arguments=(
$argument_list
'*:filename:_files'
)
_arguments -s $arguments

View File

@ -1,5 +1,7 @@
#compdef mkcd
# Make a directory, then change into it
# ========== Shortcuts ==========
mkcd() {
[[ ! -d "${1}" ]] && mkdir --parents -- "${1}"
cd "${1}" || exit

View File

@ -1,7 +1,6 @@
#compdef open
# zsh completions for 'open'
# automatically generated with http://github.com/RobSis/zsh-completion-generator
# ========== Completions ==========
local arguments
arguments=(

View File

@ -1,7 +1,6 @@
#compdef quickdel
# zsh completions for 'quickdel'
# automatically generated with http://github.com/RobSis/zsh-completion-generator
# ========== Completions ==========
local arguments
arguments=(

View File

@ -1,14 +0,0 @@
# call the fedit script
_fedit() {
/usr/bin/fedit
}
_etcedit() {
/usr/bin/fedit -E
}
zle -N fedit
bindkey -M viins '^o' _fedit
zle -N _etcedit
bindkey -M viins '^e' _etcedit