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

[linux] use gnu readline for linux console cli #2527

Merged
merged 1 commit into from
Mar 18, 2024

Conversation

imranh2
Copy link
Contributor

@imranh2 imranh2 commented Feb 26, 2024

🍰 Pullrequest

Use GNU Readline to do CLI input on Linux. Lets you have a command history and edit commands inline. This also opens up tab completion that can be implemented at some point.

Windows users still get the old way of doing input via fgets reading stdin...

I moved some of the world stopping stuff out of the CLI files too and into the main function that creates and destroys it all.

Proof

  • None

Issues

  • None

How2Test

  • Compile and build on linux (you'll need the deb/ubuntu package libreadline-dev)
  • Make sure Console.Enable is enabled in mangosd.conf and try some commands! Use the arrow keys on your keyboard :)

Todo / Checklist

  • Test on windows (i'll need someone else to do the windows building testing please)

@imranh2
Copy link
Contributor Author

imranh2 commented Feb 27, 2024

Tested on windows, works as expected :)

@ratkosrb ratkosrb merged commit e5ba29c into vmangos:development Mar 18, 2024
3 checks passed
@imranh2 imranh2 deleted the linux_readline branch March 30, 2024 10:20
@imranh2 imranh2 mentioned this pull request Apr 6, 2024
1 task
ratkosrb added a commit that referenced this pull request Jun 21, 2024
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.

2 participants