diff options
author | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-02-27 13:02:56 +0100 |
---|---|---|
committer | Raymaekers Luca <raymaekers.luca@gmail.com> | 2023-02-27 13:02:56 +0100 |
commit | 5c1338a567fd546377b92e5f83358aa017979041 (patch) | |
tree | 2012a39f9ae91234ac356a011a6f07a1110586d2 /bin/common | |
parent | 457a28ed89be9e2f698786e83538ee61292ae08c (diff) |
added -1 option for one explicitly asking one parameter
Diffstat (limited to 'bin/common')
-rwxr-xr-x | bin/common/ask | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/bin/common/ask b/bin/common/ask index 85b5f9e..e9f6c91 100755 --- a/bin/common/ask +++ b/bin/common/ask @@ -1,13 +1,18 @@ -#!/usr/bin/env bash -# Depends on passmenu +#!/bin/sh if [ -z "$1" ] then echo -n ">" read prompt +elif [ "$1" = "-1" ] +then + shift + prompt=$1 + test -z "$1" || exit 1 else prompt="$@" fi + API_KEY="$(pass tokens/openai-api)" data=$(echo \ |