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

-V message goes insane in most terminals #10

Closed
fosskers opened this issue Sep 8, 2012 · 17 comments
Closed

-V message goes insane in most terminals #10

fosskers opened this issue Sep 8, 2012 · 17 comments
Labels

Comments

@fosskers
Copy link
Owner

fosskers commented Sep 8, 2012

I wonder which ones? My method for animating pacman is pretty reliant on manually moving the cursor around. If the terminal is ignoring that I don't really know what else to do.

@Kwpolska
Copy link
Contributor

most. mate-terminal gnome-terminal terminal/Xfce konsole xterm sakura roxterm, and I haven’t tested everything.

@fosskers
Copy link
Owner Author

Wow, thanks for testing this. I had a hell of a day at work yesterday and had no time to look at anything.
So, what is it about urxvt that makes this work? Also, quick question. What happens when you aura -Cb in those terminals? It's update message thingy works on the same principle. (using /r and /b to move back up a line)

@Kwpolska
Copy link
Contributor

[kwpolska@kwpolska-lin ~]% sudo aura -Cb ./bkp
aura >>= Backing up cache to `./bkp`
aura >>= Package files to backup: `47`
aura >>= Proceed with backup? [y/n] y
aura >>= Backing up. This may take a few minutes...

aura >>= Copying #[1]
aura >>= Copying #[2]
aura >>= Copying #[3]
...

On a side note, for stuff like that, early versions of Trashman (those done in the old kru repo) used \b (0x08) for stuff like that and it worked.

@fosskers
Copy link
Owner Author

That copy dialog is supposed to stay on the same line! Hmm... so why isn't it?

@Kwpolska
Copy link
Contributor

FOR FUTURE REFERENCE, GIST.

Haskell problem. You are using a fancy raiseCursorBy function. So, I guess this is \r. I decided to do some testing.

#!/usr/bin/python3
print('Hello world #0', end='')

for i in range(1, 50):
    print(len(str(i-1)) * '\b' + str(i), end='')

print()
###
print('Hello world #0', end='')

for i in range(50, 100):
    print('\rHello world #' + str(i), end='')


print()

Output is, in all the terminals mentioned in this thread + guake:

Hello world #49
Hello world #99

It is important that end='' is used for the print() commands. This is important, as without that (i.e. if a newlne is added below), the output is:

Hello world #0
1
[...]
49

Hello world #0
Hello world #50
[...]
Hello world #99

(note the extra newline at the end)

BUT! I ran the code without end='' in urxvt. And:
urxvt

So, there are some newlines you need to kill in -V and -Cb. Problem solved.

@fosskers
Copy link
Owner Author

Thank you.

@Kwpolska
Copy link
Contributor

No problem, I was just bored.

@fosskers
Copy link
Owner Author

I was poking at this yesterday. It's hard to void newline characters, since the images I'm animating are multiple lines long.

@fosskers
Copy link
Owner Author

Latest commit should have fixed this. By the way, how do you reference commits to issues?

@Kwpolska
Copy link
Contributor

Will test in a minute.

https://github.com/blog/831-issues-2-0-the-next-generationCommits + Issues.


Kwpolska/pkgbuilder#16:

There's one or two lines over in aura to change as well if you could.

It should be right, and if it isn’t, I will provide a pull request in a while.

BTW: if you have a spare moment, I have four strings to translate in PB. Just send them here, in the exact order.

"Running PKGBUILDer as root can break your system!"
"Interrupt signal received\n"
"Synchronizing package databases..."
"Starting full system upgrade..."

@fosskers
Copy link
Owner Author

Thanks! And here:

管理者としてPKGBUILDerを実行すると危険性あり!
(actually, could you give me some context for the second line?)
パッケージデーターベースを同期中・・・
完全アップグレードを開始・・・

@Kwpolska
Copy link
Contributor

The second line = ^C message, copied verbatim from Pacman. (#3 and #4 are also straight from pacman)

@fosskers
Copy link
Owner Author

Yeah, they looked familiar.
Here's the line:

途中切断

@Kwpolska
Copy link
Contributor

Okay, added in. Releasing when it’s done (and that will be when I will finish testing because of some nasty changes). Thanks!


AuraLogo.hs:6:8:
    Could not find module `System.Console.ANSI'
    Use -v to see a list of the files searched for.

Dep required: haskell-ansi-terminal (another AUR dep, and I’m wrapping the @ArChPm thing up right now, BTW)

Now, it seems to work. But it still fails when using Konsole, yours truly’s terminal emulator of choice. http://bugs.kde.org would love to see a report.

@fosskers
Copy link
Owner Author

No problem!

I've already added haskell-ansi-terminal to the PKGBUILD, so people building it officially via the AUR won't have this problem.

As for Konsole.... :( I tried it in sakura and xterm and it worked there so I figured it was problem solved.

@Kwpolska
Copy link
Contributor

On Sat, Sep 29, 2012 at 1:14 PM, Colin Woodbury notifications@github.comwrote:

No problem!

I've already added haskell-ansi-terminal to the PKGBUILD, so people
building it officially via the AUR won't have this problem.

As for Konsole.... :( I tried it in sakura and xterm and it worked there.


Reply to this email directly or view it on GitHubhttps://github.com//issues/10#issuecomment-9003011.

As I said, report a bug to the KDE team. That should be enough.

Kwpolska http://kwpolska.tk
stop html mail | always bottom-post
www.asciiribbon.org | www.netmeister.org/news/learn2quote.html
GPG KEY: 5EAAEA16

@fosskers
Copy link
Owner Author

Roger.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants