From a2fa8da6ee0f37b6b23f0fe0ef39e1ce02ef6fd6 Mon Sep 17 00:00:00 2001 From: wunderwuzzi23 Date: Sat, 4 Mar 2023 22:20:24 -0800 Subject: [PATCH] correct ask flag behavior --- README.md | 13 +++++++++++++ install.sh | 4 ++++ yolo.py | 2 +- 3 files changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 7b78f12..18014dc 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,23 @@ alias yolo=$(pwd)/yolo.py alias computer=$(pwd)/yolo.py #optional ``` +## Aliases + +To set the alias on each login, add them to your .bashrc or .bash_aliases file. + +``` +echo "alias yolo=$TARGET_FULLPATH" >> ~/.bash_aliases +echo "alias computer=$TARGET_FULLPATH" >> ~/.bash_aliases +``` + +## Installation script + Another option is to run `source install.sh` after cloning the repo. That does the following: 1. Copies the necessary files to `~/yolo-ai-cmdbot/` 2. Creates two aliases `yolo` and `computer` pointint to `~/yolo-ai-cmdbot/yolo.py` +3. Adds the aliases to the `~/bash_aliases` file (only tested on Ubuntu) +That's it. Now make sure you have an OpenAI API key set. # macOS diff --git a/install.sh b/install.sh index c376a9e..73ac811 100644 --- a/install.sh +++ b/install.sh @@ -10,3 +10,7 @@ chmod +x $TARGET_FULLPATH # Creates two aliases for use alias yolo=$TARGET_FULLPATH alias computer=$TARGET_FULLPATH + +# Add the aliases to the logon scripts +echo "alias yolo=$TARGET_FULLPATH" >> ~/.bash_aliases +echo "alias computer=$TARGET_FULLPATH" >> ~/.bash_aliases diff --git a/yolo.py b/yolo.py index bd7a6db..34f59ec 100755 --- a/yolo.py +++ b/yolo.py @@ -40,7 +40,7 @@ if len(sys.argv) < 2: # safety switch (no yolo mode) if sys.argv[1] == "-a": - ask = True + ask_flag = True command_start_idx = 2 # to allow easy/natural use we don't require the input to be a