mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-05 12:37:33 -05:00
org-capture: text from args, else stdin
old behavior was to use stdin in non-interactive This prevented binding eg in qutebrowser
This commit is contained in:
@ -28,7 +28,11 @@ while getopts "hk:" opt; do
|
|||||||
done
|
done
|
||||||
shift $((OPTIND-1))
|
shift $((OPTIND-1))
|
||||||
|
|
||||||
[ -t 0 ] && str="$*" || str=$(cat)
|
# use remaining args, else try stdin
|
||||||
|
str="$*"
|
||||||
|
if [ -z $str ]; then
|
||||||
|
str=$(cat)
|
||||||
|
fi
|
||||||
|
|
||||||
# Fix incompatible terminals that cause odd 'not a valid terminal' errors
|
# Fix incompatible terminals that cause odd 'not a valid terminal' errors
|
||||||
[ "$TERM" = "alacritty" ] && export TERM=xterm-256color
|
[ "$TERM" = "alacritty" ] && export TERM=xterm-256color
|
||||||
|
Reference in New Issue
Block a user