mirror of
https://github.com/shokinn/.files.git
synced 2026-09-22 19:14:44 +00:00
Add mocker completion script and update dotfiles configuration
This commit is contained in:
parent
4ed17e609d
commit
91ab96620d
2 changed files with 22 additions and 0 deletions
|
|
@ -161,6 +161,9 @@ dotfiles:
|
||||||
f_p10k_mise:
|
f_p10k_mise:
|
||||||
dst: ~/.config/zsh/p10k.mise.zsh
|
dst: ~/.config/zsh/p10k.mise.zsh
|
||||||
src: config/zsh/p10k.mise.zsh
|
src: config/zsh/p10k.mise.zsh
|
||||||
|
f_mocker_completion:
|
||||||
|
dst: ~/.oh-my-zsh/custom/plugins/custom-completions/_mocker
|
||||||
|
src: config/zsh/completions/_mocker
|
||||||
f_finicky.js:
|
f_finicky.js:
|
||||||
src: finicky.js.age
|
src: finicky.js.age
|
||||||
dst: ~/.finicky.js
|
dst: ~/.finicky.js
|
||||||
|
|
@ -208,6 +211,7 @@ profiles:
|
||||||
- f_codew
|
- f_codew
|
||||||
- f_commonfunc
|
- f_commonfunc
|
||||||
- f_config
|
- f_config
|
||||||
|
- f_mocker_completion
|
||||||
- f_p10k_mise
|
- f_p10k_mise
|
||||||
- f_powerlevel10krc
|
- f_powerlevel10krc
|
||||||
- f_secretfiles
|
- f_secretfiles
|
||||||
|
|
|
||||||
18
dotfiles/config/zsh/completions/_mocker
Normal file
18
dotfiles/config/zsh/completions/_mocker
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
#compdef mocker
|
||||||
|
|
||||||
|
#
|
||||||
|
# {{@@ header() @@}}
|
||||||
|
#
|
||||||
|
|
||||||
|
# Load the completion generated by Mocker itself on first use. Keeping this as
|
||||||
|
# a small shim means the available commands and flags always match the installed
|
||||||
|
# Mocker version without adding its completion-generation cost to shell startup.
|
||||||
|
_mocker() {
|
||||||
|
local completion_script
|
||||||
|
|
||||||
|
completion_script="$(command mocker --generate-completion-script zsh 2>/dev/null)" || return 1
|
||||||
|
[[ -n "${completion_script}" ]] || return 1
|
||||||
|
|
||||||
|
eval "${completion_script}"
|
||||||
|
_mocker "$@"
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue