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

Use custom shell for the user prompt #3

Open
veracioux opened this issue Oct 12, 2021 · 0 comments
Open

Use custom shell for the user prompt #3

veracioux opened this issue Oct 12, 2021 · 0 comments
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed

Comments

@veracioux
Copy link
Owner

Currently the style of the prompt that shows which command a user has to run is set using the prompt shell function that the user can define in tuterm's configuration. It would be great if tuterm could be configured to use the user's shell instead.

This would allow for some very neat things, if the user's shell supports them:

  • Autocompletion
  • Syntax highlighting
  • Shell keybindings
  • Consistent prompt between the user's usual shell and tuterm

This doesn't strike me as an easy task. I tried doing this with unbuffer and expect but it doesn't seem to work. Granted, I do not know much about those programs. Currently, my thinking is that this has to be done using pseudoterminals. As far as I know there is not a bash way of working with pseudoterminals in this way, so I am leaning toward a python implementation. I have never done anything with pseudoterminals, so it will take me a while to implement this and I don't know when I'll get around to it. I would very much like this feature implemented because it is just awesome.

Some considerations:

  • Should work across different shells (ideally all of them) with shell-specific hard-coding reduced to a minimum
  • The command the user typed in must be extracted reliably from the shell's output so that tuterm can verify if it matches the expected command
  • The shell must be aborted before it can run the command the user has entered
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant