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

Strip leading spaces when checking for commands #427

Merged
merged 1 commit into from
Jan 1, 2024

Conversation

A-Joshi
Copy link
Contributor

@A-Joshi A-Joshi commented Dec 27, 2023

If we have a leading space on the prompt command line - e.g. ">>> /run ls" the command fails while ">>>/run ls" works.
The reason is that the code looks for a "/" as the first character but the first character is a whitespace. Trimming the whitespace fixes the issue.

Have only trimmed it on the left in case the commands being run need trailing whitespace (things like xargs would use them).

Copy link
Member

@jakethekoenig jakethekoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@jakethekoenig jakethekoenig merged commit 013a3e5 into AbanteAI:main Jan 1, 2024
8 checks passed
@A-Joshi A-Joshi deleted the fix-command branch January 1, 2024 20:19
PCSwingle added a commit that referenced this pull request Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants