aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorHsieh Chin Fan <pham@topo.tw>2023-03-27 20:53:43 +0800
committerHsieh Chin Fan <pham@topo.tw>2023-03-27 20:53:43 +0800
commit904a00731ce15e70b1add5209095f93dafa141ce (patch)
tree2321ff58d4c8e3fb6fbf6853b1c796a9e643fe3d
parente27a5e29fde4f413ba361e14437085935a3fa9c9 (diff)
Update
-rwxr-xr-xbin/gpt/gpt8
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/gpt/gpt b/bin/gpt/gpt
index 487b3df..e44d756 100755
--- a/bin/gpt/gpt
+++ b/bin/gpt/gpt
@@ -129,8 +129,7 @@ _get_content() {
129 if [ ! "$SKIP_INPUT" = true ] ; then 129 if [ ! "$SKIP_INPUT" = true ] ; then
130 # Read content from terminal 130 # Read content from terminal
131 while true; do 131 while true; do
132 echo -en "\e[1mLet's Chat: \e[0m" 132 read -e -r -p "Let's Chat: " content </dev/tty
133 read -e -r content </dev/tty
134 if [ "$content" = .c ]; then 133 if [ "$content" = .c ]; then
135 echo -e '\n======\n' 134 echo -e '\n======\n'
136 _configure_options 135 _configure_options
@@ -234,6 +233,11 @@ while [ "$#" -gt 0 ]; do
234 content="$1" 233 content="$1"
235 shift 1 234 shift 1
236 ;; 235 ;;
236 --)
237 SKIP_INPUT=true
238 content="$@"
239 break
240 ;;
237 esac 241 esac
238done 242done
239 243