TkTerminal icon indicating copy to clipboard operation
TkTerminal copied to clipboard

Using `\` to make newlines doesn't work

Open Moosems opened this issue 2 years ago • 21 comments

Moosems avatar May 25 '23 12:05 Moosems

?

littlewhitecloud avatar May 26 '23 12:05 littlewhitecloud

In a terminal, you can use backslashes to give multiple lines for one big command.

Moosems avatar May 26 '23 13:05 Moosems

@Moosems can you give a screenshot? Or can you assign yourself to improve this function? I really can't image how to use it.

littlewhitecloud avatar Jun 09 '23 12:06 littlewhitecloud

Is it just like:

cl /Ox /Ot /favor:blend /EHsc \
/GA /nologo /LD /DEF: plugin.def plugin.c \
/w /errorReport:none /std:c17 /D "_WINDOWS"

littlewhitecloud avatar Jun 09 '23 12:06 littlewhitecloud

Yeah. In windows you use && but on many other systems and with bash you use \. I'll make an implementation sometime. I'm busy this week though so I can't do nearly and programming right now.

Moosems avatar Jun 09 '23 12:06 Moosems

fixed it in #31

littlewhitecloud avatar Jun 11 '23 07:06 littlewhitecloud

Also needs && for windows ;).

Moosems avatar Jun 11 '23 11:06 Moosems

Also needs && for windows ;).

Added it! :D

littlewhitecloud avatar Jun 12 '23 11:06 littlewhitecloud

You're epic.

Moosems avatar Jun 12 '23 12:06 Moosems

You're epic.

Thanks! Actally it is quite easy to add "&&"! This is my first time to work with others on my repo. I feel very accomplished. It is meaningful for me to work with a funny guy like you. You are epic too!

littlewhitecloud avatar Jun 12 '23 12:06 littlewhitecloud

So, what's wrong with the latest code?

littlewhitecloud avatar Jun 23 '23 05:06 littlewhitecloud

image I tested a lot but found nothing

littlewhitecloud avatar Jun 23 '23 05:06 littlewhitecloud

The backslash isn't removed so the terminal treats the chars as escaped chars.

Moosems avatar Jun 23 '23 10:06 Moosems

image What? It doesn't happen.

littlewhitecloud avatar Jun 23 '23 11:06 littlewhitecloud

Can you give a screenshot or an example? @Moosems This issues is the last issues in the pr we didn't complete

littlewhitecloud avatar Jun 27 '23 02:06 littlewhitecloud

I'm not with my computer this week but from memory here's what happens:

Moosems$ cd \
.
Unable to change to directory (insert escaped period char)

Moosems avatar Jun 27 '23 02:06 Moosems

image nothing happened...?

littlewhitecloud avatar Jun 27 '23 02:06 littlewhitecloud

quite strange

littlewhitecloud avatar Jun 27 '23 03:06 littlewhitecloud

I'm not with my computer this week but from memory here's what happens:

Moosems$ cd \
.
Unable to change to directory (insert escaped period char)

It can't be, I wrote code:

self.longcmd += cmd.split(self.longsymbol)[0]

to cut off the \\

littlewhitecloud avatar Jun 27 '23 03:06 littlewhitecloud

Still keep open it. And try to fix it when @Moosems you have computer and you are free to test.

littlewhitecloud avatar Jun 27 '23 03:06 littlewhitecloud

Will do!

Moosems avatar Jun 27 '23 03:06 Moosems