Add complete edit history using fre
This commit is contained in:
parent
6bc5bcee50
commit
182abc1ad0
5 changed files with 12 additions and 2 deletions
4
bin/tmux-edit-history
Executable file
4
bin/tmux-edit-history
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
_file=$(fre --store_name edit-history --sorted | exec fzf --no-sort)
|
||||
[ -n "$_file" ] && exec tmux-edit-helper "$_file"
|
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/env bash
|
||||
set -exo pipefail
|
||||
set -eo pipefail
|
||||
|
||||
eval "$(direnv export bash 2>/dev/null)"
|
||||
|
||||
|
@ -16,6 +16,8 @@ else
|
|||
fre --store_name "$_store" --add "$_file"
|
||||
fi
|
||||
|
||||
fre --store_name "edit-history" --add "$_file"
|
||||
|
||||
(tmux select-window -t helix &&
|
||||
tmux send-keys -t helix Escape &&
|
||||
tmux send-keys -t helix ":open ${_file}" Enter) || tmux new-window -t 42 -n helix helix "${_file}"
|
||||
|
|
|
@ -16,6 +16,8 @@ else
|
|||
fre --store_name "$_store" --add "$_file"
|
||||
fi
|
||||
|
||||
fre --store_name "edit-history" --add "$_file"
|
||||
|
||||
_nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock"
|
||||
|
||||
(tmux select-window -t nvim 2>/dev/null && tmux select-pane -t 0) && exec nvim --server "$_nvim_socket" --remote "$_file"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue