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

Add support for zOS #226

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Add support for zOS #226

wants to merge 3 commits into from

Conversation

v1gnesh
Copy link

@v1gnesh v1gnesh commented May 28, 2023

Hi,

Firstly, thank you for this excellent project!

In this PR, I've updated the build tags in a few files to add support for zOS, which is an IBM Z (aka mainframe) operating system.

Test results look like this:

tmpdir: /tmp
=== RUN   TestRetSegment
--- PASS: TestRetSegment (0.00s)
=== RUN   TestSplitSegment
--- PASS: TestSplitSegment (0.00s)
=== RUN   TestSegmentCompleter
--- PASS: TestSegmentCompleter (0.00s)
=== RUN   TestRace
--- PASS: TestRace (0.00s)
=== RUN   TestRuneWidth
--- PASS: TestRuneWidth (0.00s)
=== RUN   TestAggRunes
--- PASS: TestAggRunes (0.00s)
PASS
ok  	github.com/chzyer/readline	1.018s
?   	github.com/chzyer/readline/example/readline-demo	[no test files]
?   	github.com/chzyer/readline/example/readline-im	[no test files]
?   	github.com/chzyer/readline/example/readline-multiline	[no test files]
?   	github.com/chzyer/readline/example/readline-pass-strength	[no test files]
?   	github.com/chzyer/readline/example/readline-remote/readline-remote-client	[no test files]
?   	github.com/chzyer/readline/example/readline-remote/readline-remote-server	[no test files]
=== RUN   TestRuneWidth
--- PASS: TestRuneWidth (0.00s)
=== RUN   TestAggRunes
--- PASS: TestAggRunes (0.00s)
PASS
ok  	github.com/chzyer/readline/runes	0.410s

... and the output from examples look like this:

$ cd readline-demo && go run .
» enhance
2023/05/28 01:05:08 you said: "enhance"
» mode
current mode: emacs
» login
please enter your password: 
you enter: "boo"
» sleep
2023/05/28 01:06:15 sleep 4 second
» bye


$ cd ../readline-im && go run .
Hi, loopy! My name is Dave.
2023/05/28 01:07:39 Dave: hello
2023/05/28 01:07:41 Dave: hello
.
.
2023/05/28 01:08:44 Dave: bye


$ cd ../readline-multiline && go run .
> why
>>> test
>>> me;
why test me;
> bye;
bye;


$ cd ../readline-pass-strength && go run .
✔ ENT New Password: 
Your password was: toostrong
⚠ ENT New Password: 
Your password was: lame


@v1gnesh
Copy link
Author

v1gnesh commented Jun 1, 2023

Hi @chzyer, when you have a chance, could you please review & pull this in?

@wader
Copy link

wader commented Jun 1, 2023

@v1gnesh hey, @chzyer haven't responded in quite a while. if your interesting some ppl have organised a fork with various fixes at https://github.com/ergochat/readline

@v1gnesh
Copy link
Author

v1gnesh commented Jun 1, 2023

Thanks for responding here @wader.
Terraform depends on chzyer/readline, hence I'm here :)
Would you/ergochat be able to request Terraform to switch to your fork?

EDIT: Coincidentally, someone has found a bug in chzyer/readline in the Terraform repo.
So I've asked there if they can switch to ergochat/readline.
hashicorp/terraform#33195 (comment)

@wader
Copy link

wader commented Jun 1, 2023

@v1gnesh I see, then your kind of in the same boat as us :) i'm not involved in terraform myself but maybe you can ask them about the situation?

@wader
Copy link

wader commented Jun 1, 2023

ping @slingamn for awareness (ergochat maintainer)

@slingamn
Copy link

slingamn commented Jun 1, 2023

@v1gnesh can you try ergochat/readline v0.0.3? I believe I added zos support already in ergochat/readline#10

@v1gnesh
Copy link
Author

v1gnesh commented Jun 2, 2023

@v1gnesh can you try ergochat/readline v0.0.3? I believe I added zos support already in ergochat/readline#10

@slingamn Also curious... what's your story with zos :) ?

@slingamn
Copy link

slingamn commented Jun 2, 2023

I have no connection to zos :-) I just upgraded readline's internal fork of x/term to v0.6.0, which added zos support in 2021: golang/term@b80969c

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

Successfully merging this pull request may close these issues.

3 participants