Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extglob support for gptcli command #9

Open
huwan opened this issue Mar 30, 2023 · 1 comment
Open

extglob support for gptcli command #9

huwan opened this issue Mar 30, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@huwan
Copy link

huwan commented Mar 30, 2023

The gptcli command uses /bin/sh as the default shell to execute commands. However, when some commands require the use of "extglob" extensions, they cannot be executed. Here's an example.

$ gptcli command "make five 5 folders and 3 files"
❯ mkdir folder1 folder2 folder3 folder4 folder5 && touch file1.txt file2.txt file3.txt

$ ls
file1.txt  file2.txt  file3.txt  folder1  folder2  folder3  folder4  folder5
$ gptcli command "move all folders except folder4 and folder5 to folder5"
❯ mv !(folder4|folder5) folder5
? execute the command above ⬆️ ?  Yes
/bin/sh: 1: Syntax error: "(" unexpected

If I enable the shopt -s extglob in bash, and run the same commnad manully, it works fine.

$ mv !(folder4|folder5) folder5
$ ls
folder4  folder5
@JohannLai JohannLai self-assigned this Mar 31, 2023
@JohannLai JohannLai added the bug Something isn't working label Mar 31, 2023
@JohannLai
Copy link
Owner

@huwan Thank you very much for your feedback. I will handle this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants