littlewhitecloud / TkTerminal

A terminal emulator widget written in Python using tkinter
MIT License
15 stars 2 forks source link

Using `\` to make newlines doesn't work #19

Open Moosems opened 1 year ago

littlewhitecloud commented 1 year ago

?

Moosems commented 1 year ago

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

littlewhitecloud commented 1 year ago

@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 commented 1 year ago

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"
Moosems commented 1 year ago

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.

littlewhitecloud commented 1 year ago

fixed it in #31

Moosems commented 1 year ago

Also needs && for windows ;).

littlewhitecloud commented 1 year ago

Also needs && for windows ;).

Added it! :D

Moosems commented 1 year ago

You're epic.

littlewhitecloud commented 1 year ago

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 commented 1 year ago

So, what's wrong with the latest code?

littlewhitecloud commented 1 year ago

image I tested a lot but found nothing

Moosems commented 1 year ago

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

littlewhitecloud commented 1 year ago

image What? It doesn't happen.

littlewhitecloud commented 1 year ago

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

Moosems commented 1 year ago

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)
littlewhitecloud commented 1 year ago

image nothing happened...?

littlewhitecloud commented 1 year ago

quite strange

littlewhitecloud commented 1 year ago

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 commented 1 year ago

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

Moosems commented 1 year ago

Will do!