diff --git a/data/scripts/o b/data/scripts/o index b671925..2180e09 100755 --- a/data/scripts/o +++ b/data/scripts/o @@ -328,6 +328,10 @@ cmd_prompt() { printf "\n" break fi + # Drain any remaining lines from a multi-line paste (bracketed paste or fast input) + while IFS= read -r -t 0.05 extra_line; do + line="$line"$'\n'"$extra_line" + done if [[ -z "$buf" && "$line" == /* ]]; then history -s "$line" local cmd="${line#/}"