• 1 Post
  • 9 Comments
Joined 2 months ago
cake
Cake day: August 28th, 2025

help-circle
  • I will paste here my investigations. So far, I’ve tried only Blesh and zsh-shift-select, both in Gnome Terminal. Results are not satisfying: a lot of effort to get 60% of what you want and break 20% of what you had.

    Possible solutions

    Blesh

    https://github.com/akinomyoga/ble.sh/wiki/Manual-§4-Editing

    • Super simple installation.
    • Home/End - Jump to start/end as expected. ✅
    • Ctrl+Backspace removes left char instead of left word. ❌
    • Ctrl+Delete removes next word as it should. ✅
    • Shift+arrows - char-wise text selection ✅
    • Shift+Ctrl+arrows - word-wise text selection ✅
    • Shift+Home/End don’t do anything. ❌
    • Backspace/Delete: When smth is selected they delete it. ✅
    • Copy/Paste/Cut: ❌
      • It’s Alt+W/Ctrl+Y/Ctrl+W instead of Ctrl+C/Ctrl+V/Ctrl+X.
      • All work with selection as expected.
      • All work with internal buffer instead of system clipboard.
    • System clipboard:
      • Can’t copy selection to clipboard, can’t paste clipboard into selection.
      • Ctrl+Shift+C/V work as they do in vanilla bash: copy what is selected with mouse to clipboard, paste from clipboard.
    • Ctrl+C prints current command and starts new one like in vanilla bash.

    zsh-shift-select

    • Stated to have best compatibiliy with Alacritty.
      • Alacritty requires Cargo (440MB).
        • cannot install package alacritty 0.16.1, it requires rustc 1.85.0 or newer, while the currently active rustc version is 1.75.0 Fail. Will use Gnome Terminal instead.
    • Needs zsh, super simple installation.
      • Zsh should be default shell, gnome-shell crashed with SIGSEGV.
      • Plugin itself has simple installation, just git clone .zsh file and source it in .zshrc
    • Ctrl+arrows - prints CD instead of moving word-wise ❌
    • Ctrl+Backspace, Ctrl+Delete - are not deleting left/right word ❌
    • Home/End - Jump to start/end as expected. ✅
    • Shift+Left/Right - char-wise text selection ✅
    • Shift+Ctrl+arrows - word-wise text selection ✅
    • Shift+Home/End don’t do anything. ❌
    • Shift+Up/Down - Select one line up/down ✅
    • Backspace/Delete - When smth is selected - delete it. ✅
    • Copy/Paste/Cut: ❌
      • Documented as Alt+W/Ctrl+Y/Ctrl+W instead of Ctrl+C/Ctrl+V/Ctrl+X.
      • Alt+W/Ctrl+Y work as copy/paste.
      • Ctrl+W removes previous word instead of Cut selection.
      • Work with internal buffer instead of system clipboard.
    • System clipboard:
      • Ctrl+Shift+C/V work as they do in blesh and vanilla bash.
      • Can’t copy selection to clipboard, can’t paste clipboard into selection.
    • Ctrl+C prints current command and starts new one like in vanilla bash.

  • Macintosh has nothing to do with it. Maybe I want to grow selection to the left with E and to the right with R - they are not Macintosh keys, but still I will have a hard time trying to get what I want.

    Do you mean this whole concept of growing selection from the same cursor you type with and performing operations on this selected area as a single entity is a Macintosh-way, originated in GUI? And its foreign to terminals and terminals developed a different way of editing text and you propose learning this native text-editing without using foreign techniques like cursor-based text selection… This makes sense. And sure it’s possible to be effective in terminal while using it traditional way. If this is what you mean, now I understand.

    I made a glimpse on the world where this shift-selection doesn’t exist and got excited about this feature even more, and I even think it’s genius.

    System-wide clipboard is probably not the “traditional way” either, and it doesn’t work quite well in Linux terminals too.

    A couple of years ago I invested some time into Vim and it was a pleasant experience, but it was detached from all other experiences I had on my PC. Mentally switching between different text editing modes is disgusting, I hate it so much. I don’t want a new one. I’m fine with the one I have.

    Linux and its terminals are meaningful only as long as they do what I want them to do. I don’t care if some of my activities are “not Linux-way”.



  • I feel like you’re just defending the final state you observe. E.g. why do you hate shift+arrows for text selection but not arrows themselves for moving a cursor? And how selecting text with a mouse is better? I find it even funny to think one of these techniques is cursed and other are blessed. Never I could imagine selecting text with Shift can encounter such opposition.


  • It’s nice to see you think of it as of movement towards consistency. I also look at it this way.

    But what is it about Ctrl? Text editing is historically the main task of computers, and Ctrl is the main “modifier” key. To me it seems fair it’s dedicated for some text editing shortcuts. Probably they are consistent since 1980’s.


  • What terminal emulator are you using where ctrl-c copies instead of sending SIGINT when text is selected?

    This is what I experienced in conhost.exe (legacy windows console experience, predecessor of Windows Terminal) + Powershell. In windows terminal it works this way too. This is why I suspect it’s related not to terminal itself (conhost.exe/wt.exe/gnome terminal etc), and not to specific shell (bash/powershell), but to an extension for shell (ReadLine,PSReadLine).

    As for various types of buffers and clipboards, I always felt like one system-wide clipboard with clipboard history is enough. When I cut something from terminal, quite often I paste it into another app, and not back to terminal.


  • Than you for the link, it looks like a very close match, even though I don’t quite understand how it is related to eMacs.

    About what I’m trying to do being stupid — very interesting. What about learning vim only to notice you can’t use this skill in 70% text editing areas you interact with, and searching for firefox vi extension afterwards and trying to apply .vimconfig to it, is it stupid? Probably not. But trying to select, copy and paste text in a text-based program — that is stupid. I got it.


  • podbrushkin@mander.xyzOPtoLinux@lemmy.mlLinux terminal with text selection
    link
    fedilink
    arrow-up
    4
    arrow-down
    1
    ·
    edit-2
    24 hours ago

    For more sophisticated text selection

    Here it is. What I’m asking for is not sophisticated at all, quite the opposite. I ask for keybindings which work in almost all text editing areas, in all applications, all operating systems. Vi and eMacs are steps in opposite direction. I think I even used a vi-mode in terminal a couple of years ago. I doubt it’s possible to simplify command editing with it.