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

cat with heardoc is adding strange echo "##active_lineX##" lines! #1485

Open
bobemoe opened this issue Oct 21, 2024 · 0 comments
Open

cat with heardoc is adding strange echo "##active_lineX##" lines! #1485

bobemoe opened this issue Oct 21, 2024 · 0 comments
Labels
Needs Verification Issue needs to be reproduced with the latest version

Comments

@bobemoe
Copy link

bobemoe commented Oct 21, 2024

Describe the bug

I have just started trying this out and run into an issue where interpreter tries to create a file using a hear document, this seems a reasonable thing to do but the resulting file is not as expected. As you can see below creating the test file with three lines, when it cats it again its actually got echos between each line. Additionaly if I cat the file outside of interperater those echos are different again:

can you run the troublesome command again and then view the file to confirm?

  cat <<EOF > test                                                                                                                    
  one                                                                                                                                 
  two                                                                                                                                 
  three                                                                                                                               
  EOF                                                                                                                                 

Would you like to run this code? (y/n)

y

  cat <<EOF > test                                                                                                                    
  one                                                                                                                                 
  two                                                                                                                                 
  three                                                                                                                               
  EOF                                                                                                                                 

cat test

Would you like to run this code? (y/n)

y

cat test

  echo ""                                                                                                                             
  one                                                                                                                                 
  echo ""                                                                                                                             
  two                                                                                                                                 
  echo ""                                                                                                                             
  three                                                                                                                               
  echo ""                                                                                                                             

As confirmed, the file test contains:

   one                                                                                                                                
   two                                                                                                                                
   three                                                                                                                              

^C

Exiting.....


Now I cat it outside of interperater:

$ cat test 
echo "##active_line2##"
one
echo "##active_line3##"
two
echo "##active_line4##"
three
echo "##active_line5##"

You can see the files is actually different from what OI sees when it cats the file. This is also concerning as if files aren't being seen as what they actually are then that could cause all kinds of problems but that's maybe a separate issue.

Reproduce

  1. load interpreter
  2. ask " can you cat three lines (one,two,three) to a file using a heardoc, then view the file "
  3. observe the output inside interpreter and also view the file outside of interpreter

Expected behavior

file should not have extra echo lines in it and when interpreter views it it should represent the actual file data

Screenshots

No response

Open Interpreter version

0.3.14

Python version

3.11.2

Operating System name and version

Devuan 5

Additional context

I tried --no_highlight_active_line but no difference

@bobemoe bobemoe changed the title cat with heardoc is adding strange echo active_line lines! cat with heardoc is adding strange echo "##active_lineX##" lines! Oct 23, 2024
@MikeBirdTech MikeBirdTech added the Needs Verification Issue needs to be reproduced with the latest version label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Verification Issue needs to be reproduced with the latest version
Projects
None yet
Development

No branches or pull requests

2 participants