From 733b602554b4098df514c5aefeb06ebbb7d23bec Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 3 Jun 2020 07:43:46 -0500 Subject: Add G bind --- bollux | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/bollux b/bollux index 2325624..b6fb2a5 100755 --- a/bollux +++ b/bollux @@ -141,10 +141,16 @@ set_title() { printf '\e]2;%s - bollux\007' "$*" } -prompt() { +prompt() { # prompt [-u] PROMPT [READ_ARGS...] + read_cmd=(read -e -r) + if [[ "$1" == "-u" ]]; then + read_cmd+=(-i "$BOLLUX_URL") + shift + fi prompt="$1" shift - read " "$@" + read_cmd+=(-p "$prompt> ") + "${read_cmd[@]}"