First public release
This commit is contained in:
27
integration.zsh
Normal file
27
integration.zsh
Normal file
@@ -0,0 +1,27 @@
|
||||
function _notes_cmds {
|
||||
FILE_OUTPUT=$(mktemp)
|
||||
~/fms/fms.sh notes >${FILE_OUTPUT}
|
||||
autoload -U edit-command-line
|
||||
zle -N edit-command-line
|
||||
export COPY_SRC=${FILE_OUTPUT}
|
||||
export EDITOR="${HOME}/fms/fms.sh copy"
|
||||
export VISUAL="${HOME}/fms/fms.sh copy"
|
||||
edit-command-line
|
||||
zle -D edit-command-line
|
||||
rm -f $FILE_OUTPUT
|
||||
}
|
||||
zle -N _notes_cmds
|
||||
bindkey '^[l' _notes_cmds
|
||||
|
||||
function _f {
|
||||
if [[ $PREPROMPT_TOFILL -eq 1 ]]; then
|
||||
CMD=$(~/fms/fms.sh notes)
|
||||
LBUFFER="${CMD} $LBUFFER"
|
||||
unset PREPROMPT_TOFILL
|
||||
fi
|
||||
}
|
||||
|
||||
function f {
|
||||
export PREPROMPT_TOFILL=1
|
||||
zle -N zle-line-init _f
|
||||
}
|
||||
Reference in New Issue
Block a user