verb with focus_staging_area_no_open remains active after invoking
Hello!
It looks like there's been a change between v1.45.0 and v1.45.1 affecting usage of the verb rm below.
Before: After using the verb with a staging area open and not focused, the filter/action line would be cleared.
After: After using the verb with a staging area open and not focused, the invocation command string remains on the filter/action line. At least the first time.
I discovered this when I intended to trash some files, then open one. Instead, I trashed the one I intended to open as well. It was recovered from the trash, nothing was really lost.
Verb definitions:
{
invocation: trashcli {file}
external: trash {file}
leave_broot: false
}
{
invocation: rm
cmd: ":focus_staging_area_no_open;:trashcli {file}"
}
The external trash command is from andreafrancia/trash-cli.
It looks like the only commit between those versions was: https://github.com/Canop/broot/commit/0942e8fa48d730dde14d44884e4f3942680e69a4
I'm sorry but I fail to reproduce. There's probably something I'm missing.
Ok thanks I'll try to put together a better reproducer.
$ podman run -it --rm alpine:edge
# apk upgrade
# apk add zsh broot trash-cli
# touch ~/.zshrc
# broot --install
# exec zsh
# <<EOF >~/.config/broot/verbs.hjson
verbs: [
{
invocation: trashcli {file}
external: trash {file}
leave_broot: false
}
{
invocation: rm
cmd: ":focus_staging_area_no_open;:trashcli {file}"
}
]
EOF
# touch delme
# br # select delme and hit ctrl+g, then invoke command: rm
rm will remain the command to be invoked if enter is hit a second time.
But do the above with alpine:latest instead (broot 1.44.2, down from 1.46.4), and this won't be the case.