Various small additions
This commit is contained in:
parent
fe3c0fb5d5
commit
05f6bf7007
11 changed files with 208 additions and 5 deletions
3
compdef/_conf
Normal file
3
compdef/_conf
Normal file
|
@ -0,0 +1,3 @@
|
|||
#compdef conf
|
||||
|
||||
_arguments "1:Commands:(${(k)conf_locations})"
|
33
compdef/_tagsistant-helper
Normal file
33
compdef/_tagsistant-helper
Normal file
|
@ -0,0 +1,33 @@
|
|||
#compdef tagsistant-helper tag tcd
|
||||
|
||||
tagdir=${TAGSISTENT_ROOT:-$HOME/tagged}/store
|
||||
|
||||
_file_or_tag() {
|
||||
_alternative \
|
||||
"files:file:_files" \
|
||||
"tags:tag:_files -W $tagdir"
|
||||
}
|
||||
|
||||
_tag() {
|
||||
typeset -A opt_args
|
||||
local context state line
|
||||
|
||||
_arguments \
|
||||
"*:argument:_file_or_tag" \
|
||||
"-n[set target name]:target name:" \
|
||||
"--name[set target name]:target name:" \
|
||||
"-p[preview]"
|
||||
}
|
||||
|
||||
_tcd() {
|
||||
_files -W $tagdir
|
||||
}
|
||||
|
||||
_tagsistant-helper() {
|
||||
case $service in
|
||||
tag) _tag;;
|
||||
tcd) _tcd;;
|
||||
papertag) _papertag;;
|
||||
*) _message "Err";;
|
||||
esac
|
||||
}
|
8
compdef/_xd
Normal file
8
compdef/_xd
Normal file
|
@ -0,0 +1,8 @@
|
|||
#compdef xd
|
||||
|
||||
function _xd {
|
||||
typeset -a targets
|
||||
targets=("${(@f)$(xd -l)}")
|
||||
_describe target targets
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue