diff options
author | ben | 2024-10-09 18:48:02 +0200 |
---|---|---|
committer | ben | 2024-10-09 18:48:02 +0200 |
commit | 3b2cf3a5eeab5ba3d34bf80d9fbd618ec2dd1529 (patch) | |
tree | e1c0b10c8e54c0a3294d3c806170653542cd3e1b /integration.zsh | |
download | fms-3b2cf3a5eeab5ba3d34bf80d9fbd618ec2dd1529.tar.gz fms-3b2cf3a5eeab5ba3d34bf80d9fbd618ec2dd1529.tar.bz2 fms-3b2cf3a5eeab5ba3d34bf80d9fbd618ec2dd1529.tar.xz |
First public release
Diffstat (limited to 'integration.zsh')
-rw-r--r-- | integration.zsh | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/integration.zsh b/integration.zsh new file mode 100644 index 0000000..e582b9c --- /dev/null +++ b/integration.zsh @@ -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 +} |