clai
clai copied to clipboard
CLAI removes single quotes from command
Describe the bug When calling a command with single quotes, those single quotes are removed when inserted back into the history. For example:
echo 'hello world'
enters the history as:
echo hello world
I strongly suspect this is linked to Issue #60.
To Reproduce Steps to reproduce the behavior:
- Execute the command
echo 'hello world'
- Use your up arrow to see the last command entered
- That command will be
echo hello world
Expected behavior
Instead, the last command executed should be echo 'hello world'
Screenshots If applicable, add screenshots to help explain your problem.
Log file
If you found an error or an unexpected behaviour. It's useful for us the server log. You can find it in /var/tmp/app.log
please attach it to the issue or copy and paste last lines.
shell and OS (please complete the following information):
- OS: z/OS
- Shell bash
- Version 4.3.48(2)
Additional context
I've done some debugging on the problem, and it looks like bash-preexec.sh
is getting this line as:
__bp_in_prompt_command 'echo '\''hello world'\'''
when it really should be:
__bp_in_prompt_command 'echo \'hello world\''
bash-preexec.sh
is getting this from the shell variable $BASH_COMMAND
, so maybe bash itself is causing the problem.