Skip to main content
added 379 characters in body
Source Link
Daniel H
  • 1.6k
  • 1
  • 13
  • 23

Is it possible to get programs using GNU Readline (e.g. Bash, the Python REPL, or anything else that responds to ~/.inputrc) to let you edit the current line using the mouse? For example, I’d like to be able to click at a specific place in the line to move the cursor, or select a region of text.

I suspect the answer is “no, this is not supported”, given that I have found no useful Google results about Readline (the best I’ve found is mouse support in ZSH, which is nice because I do use it as my shell but it doesn’t help with other Readline programs), but I also haven’t been able to confirm that.

The closest I've found to this kind of thing in arbitrary Readline programs is that some terminal emulators attempt to detect when Readline is active and emit arrow-key sequences on click. I'd rather have this handled by Readline if possible, both because I expect it would do a better job and because I like the terminal emulator I currently use, which doesn't support that.

Is it possible to get programs using GNU Readline (e.g. Bash, the Python REPL, or anything else that responds to ~/.inputrc) to let you edit the current line using the mouse? For example, I’d like to be able to click at a specific place in the line to move the cursor, or select a region of text.

I suspect the answer is “no, this is not supported”, given that I have found no useful Google results about Readline (the best I’ve found is mouse support in ZSH, which is nice because I do use it as my shell but it doesn’t help with other Readline programs), but I also haven’t been able to confirm that.

Is it possible to get programs using GNU Readline (e.g. Bash, the Python REPL, or anything else that responds to ~/.inputrc) to let you edit the current line using the mouse? For example, I’d like to be able to click at a specific place in the line to move the cursor, or select a region of text.

I suspect the answer is “no, this is not supported”, given that I have found no useful Google results about Readline (the best I’ve found is mouse support in ZSH, which is nice because I do use it as my shell but it doesn’t help with other Readline programs), but I also haven’t been able to confirm that.

The closest I've found to this kind of thing in arbitrary Readline programs is that some terminal emulators attempt to detect when Readline is active and emit arrow-key sequences on click. I'd rather have this handled by Readline if possible, both because I expect it would do a better job and because I like the terminal emulator I currently use, which doesn't support that.

Source Link
Daniel H
  • 1.6k
  • 1
  • 13
  • 23

Mouse support for GNU Readline

Is it possible to get programs using GNU Readline (e.g. Bash, the Python REPL, or anything else that responds to ~/.inputrc) to let you edit the current line using the mouse? For example, I’d like to be able to click at a specific place in the line to move the cursor, or select a region of text.

I suspect the answer is “no, this is not supported”, given that I have found no useful Google results about Readline (the best I’ve found is mouse support in ZSH, which is nice because I do use it as my shell but it doesn’t help with other Readline programs), but I also haven’t been able to confirm that.