correct ask flag behavior

This commit is contained in:
wunderwuzzi23
2023-03-04 22:20:24 -08:00
parent 2101c4dc5a
commit a2fa8da6ee
3 changed files with 18 additions and 1 deletions
+13
View File
@@ -9,10 +9,23 @@ alias yolo=$(pwd)/yolo.py
alias computer=$(pwd)/yolo.py #optional 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: 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/` 1. Copies the necessary files to `~/yolo-ai-cmdbot/`
2. Creates two aliases `yolo` and `computer` pointint to `~/yolo-ai-cmdbot/yolo.py` 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 # macOS
+4
View File
@@ -10,3 +10,7 @@ chmod +x $TARGET_FULLPATH
# Creates two aliases for use # Creates two aliases for use
alias yolo=$TARGET_FULLPATH alias yolo=$TARGET_FULLPATH
alias computer=$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
+1 -1
View File
@@ -40,7 +40,7 @@ if len(sys.argv) < 2:
# safety switch (no yolo mode) # safety switch (no yolo mode)
if sys.argv[1] == "-a": if sys.argv[1] == "-a":
ask = True ask_flag = True
command_start_idx = 2 command_start_idx = 2
# to allow easy/natural use we don't require the input to be a # to allow easy/natural use we don't require the input to be a