1
0
Fork 0
dotfiles/.local/bin/opener

15 lines
348 B
Plaintext
Raw Normal View History

2024-02-01 00:33:30 +01:00
#!/bin/sh
2024-02-17 17:55:49 +01:00
# shellcheck disable=2154
2024-02-05 16:50:12 +01:00
term=
2024-02-17 17:55:49 +01:00
[ -n "$SCRATCHPAD" ] && {
set -- -ft "$@"
term="$TERMCMD -e"
}
2024-02-05 16:50:12 +01:00
2024-02-22 16:34:43 +01:00
# HACK: workaround for a bug with opening empty files in vim
2024-02-05 16:50:12 +01:00
[ "$(rifle -c "$XDG_CONFIG_HOME/lf/rifle.conf" | head -1 | cut -d ':' -f 2)" = "editor" ] && $term vim "$@"
set -- -p0 -c "$XDG_CONFIG_HOME/lf/rifle.conf" "$@"
rifle "$@"