(Translated by https://www.hiragana.jp/)
Repeat Module Cannot Send a Newline · Issue #9 · cizra/pycat · GitHub
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

Repeat Module Cannot Send a Newline #9

Open
abair opened this issue Aug 11, 2023 · 5 comments
Open

Repeat Module Cannot Send a Newline #9

abair opened this issue Aug 11, 2023 · 5 comments

Comments

@abair
Copy link
Contributor

abair commented Aug 11, 2023

When using the repeat module, sending a blank line will repeat the last line you sent; however, there's no way to send a newline or an empty line to the mud. This messes up paging readers that require a blank line to go to the next page. I tried editing repeat.py to add this functionality, but I can't seem to get it to work.

@abair
Copy link
Contributor Author

abair commented Aug 11, 2023

I can't get it to work in the repeat module since I don't know how to stop the line from sending from within that module, but I can make this alias in my world module:

r'newline': '',

And that lets me send a blank line to the mud! Still, I'd like to figure out how to fix it in the repeat module instead.

@abair
Copy link
Contributor Author

abair commented Aug 11, 2023

Come to think of it, is there anyway to suppress the sending of an input line? Even if so, can that method be called from inside the repeat module?

@cizra
Copy link
Owner

cizra commented Aug 15, 2023

Whoa, someone actually uses this thing?

I have usually sent a single space, it's usually good enough for pagers.

What kind of behavior would you propose? The whole reason for having the repeat module is to transform empty lines into previous commands. What would you like it to do instead?

@abair
Copy link
Contributor Author

abair commented Aug 15, 2023

Yup! A Python only mud client has been on my wishlist, literally, for years!

Someone's actually forked you, and their like 60 commits ahead. I haven't tried the fork yet, but it lives here:

https://github.com/MongooseMoo/pycat

As for the issue...

I can't just send a space because the input line is getting trimmed somewhere. Sending whitespace shows up as a blank line, which triggers the repeat module.

Requested functionality

I'd like to be able to bypass the repeat module and send a new line. Maybe a control sequence or maybe not trimming whitespace only lines or an input that the repeat module sees and converts to a newline?

While I Have Your Attention

I'd love some time to chat with you about the project. Maybe in Discord or something similar. If you're no longer interested in pycat, I can fork it and resume active development, but a chat with the author would save me lots of trial and error. Better yet, maybe you'll feel like picking it back up ;)

@cizra
Copy link
Owner

cizra commented Aug 17, 2023

Check out that PR - does it do what you want?

As for chatting - why not. I don't have a Discord account, though. I'll just email you instead.

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

No branches or pull requests

2 participants