Skip to content

Use custom shell for the user prompt #3

@veracioux

Description

@veracioux

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions