Off-and-on trying out an account over at @tal@oleo.cafe due to scraping bots bogging down lemmy.today to the point of near-unusability.

  • 21 Posts
  • 1.3K Comments
Joined 3 years ago
cake
Cake day: October 4th, 2023

help-circle
  • I have GNU nano 8.4 on my system. Upon investigation, in default configuration:

    • Control-Backspace deletes the last character, same as Backspace.

    • Control-Delete reverse-deletes a word.

    • Alt-Backspace deletes the last word. This might be what you want.

    • Alt-Delete deletes the entire line.

    I think that it’s probably because absent some kind of unusual extension, terminals normally send 0x08, the Backspace character, same as Control-H, for Control-Backspace.

    On my system, in bash, using foot, Control-V Control-H shows ^H. So it’s sending ASCII 0x8, the Backspace character.

    Control-V Control-Backspace shows ^H. Ditto.

    Control-V Backspace shows ^?. It’s sending the Delete character, ASCII 0x7f.

    Control-V Del shows ^[[3~. It’s sending an escape sequence.

    Back in the day, some people had their terminals set to, when you hit Backspace, send either the Backspace character or the Delete character. Not a problem I’ve run into for some years, but I’d guess that nano probably has that behavior by default, treating both 0x7f and 0x8 as hitting the Backspace key, so as not to break on systems like that.

    EDIT: I’d also add that Alt-Backspace (well, M-DEL in emacs parlance) is also what emacs uses for “delete word”, so a lot of software that uses readline, like bash, will also normally work that way out of box.

    EDIT2: If you want to investigate ways to have terminals recognize more key combinations (so that you aren’t sending the same sequence for both Control-H and Control-Backspace and want to get down and dirty aiming to configure software to use different bindings for those different keystrokes), IIRC the kitty virtual terminal emulator has been exploring extensions, and some terminal emulators have implemented some of those extensions.

    searches

    Yeah.

    https://terminfo.dev/extensions/kitty-keyboard-protocol

    The Kitty keyboard protocol solves fundamental ambiguities in traditional terminal input handling. Legacy terminals cannot distinguish between Ctrl+I and Tab, Ctrl+M and Enter, or Escape and the start of an escape sequence — they all produce the same byte sequences. The protocol also enables key-release events and distinguishes between different modifier key presses (left vs. right Shift). Applications opt in with CSI > flags u, where flags is a bitmask selecting reporting modes: disambiguate keys (1), report event types (2), report alternate keys (4), report all keys as escape sequences (8), and report associated text (16). Keys are reported as CSI unicode-key-code : shifted-key : base-layout-key ; modifiers : event-type u. Adopted by Ghostty, WezTerm, foot, and rio. The protocol is progressive — applications can request only the features they need, and terminals report which flags they support.

    That being said, I would guess that a lot of programs that run in the terminal won’t be set up out of box to rely on Kitty protocol extensions.

    EDIT3: Also, I don’t think that fbcon (the default Linux kernel framebuffer console) or fbterm (the userspace virtual terminal), one of which you’d probably use if you switched out of Wayland/X11, presently support Kitty input extensions, so if you rig up programs to rely on said extensions, you won’t have those keys available in the plain ol’ Linux console.









  • tal@lemmy.todaytolinuxmemes@lemmy.worldIt's hacker time
    link
    fedilink
    English
    arrow-up
    3
    ·
    edit-2
    1 day ago

    history | grep 'keyword'

    If it’s bash, it’s using readline, which is in emacs-like mode by default, and so you can probably use Control-R to do a reverse i-search (incremental search). Enter to invoke the command. Control-C to abort i-search.

    If a search matches multiple candidates, tap Control-R multiple times to cycle back through results.

    EDIT: Also, ! has a built-in search, so if you are sure of the starting string, you can just do that. I generally prefer to use the interactive search to confirm that I’m not invoking something wonky.

    $ touch a
    $ rm a
    $ touch a
    $ !rm
    rm a
    $ 
    

  • tal@lemmy.todaytolinuxmemes@lemmy.worldIt's hacker time
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    1 day ago

    You copy paste the command.

    $ sudo apt update
    -bash: sudo: command not found
    $
    

    Your distro doesn’t set up/install sudo by default, so your first task is installing sudo, then understanding /etc/sudoers syntax and understanding why the command to atomically replace /etc/sudoers is visudo and why on a multiuser system there’s value to atomic replacement. In the meantime, you probably learn about su and maybe, if your distro has disabled them, how to enable switching to the kernel virtual consoles on tty1 through tty7 so that in the meantime, you can do things as root while staying logged in. Also, you’re going to learn about environment variables, so as to set EDITOR, and where your shell config files live, what a login shell is, and in what shells ~/.bash_profile, ~/.profile, and ~/.bashrc run. Also, you first try running visudo as a regular user, but your distro places visudo in /usr/sbin instead of /usr/bin, so you can’t figure out why it’s not installed and are going to learn about the FHS and mlocate and updatedb so that you can find /usr/sbin/visudo and dpkg -S so that you can figure out which package it’s in and confirm that it’s actually installed and learn about PATH.






  • I am not familiar, but, cutting the “changes” section out of a review:

    https://www.rpgland.com/games/hoshigamiremix/review.html

    Remix adds various, easier difficulty levels, new character art, redone music, a new character, and an overhauled localization.

    Another problem with the game is the extreme lack of portability. It is a DS title, and as such should be capable of being played for small amounts of time at once. Unfortunately, there is no suspend feature to allow for saving while in battle. Factor in that the average battle can take 20-40 minutes and that sometimes one battle immediately follows another with no break for saving, and here’s a game that is not at all good for playing on the move.

    So going entirely off that, it sounds like the remake is probably preferable, but it might not be a good idea if you plan to play the DS game as a “mobile” game — dropping into the thing for a few minutes while waiting in a line or something.



  • tal@lemmy.todaytolinuxmemes@lemmy.worldTerms of Service
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    2 days ago

    Instead of using fbcon (the default, in-kernel framebuffer-based terminal emulator), use fbterm (a userspace framebuffer terminal emulator, which supports backgrounds) with fbv as specified in the fbterm man page.

    It looks like there’s also a patch, fbcondecor, to add background support to fbcon, but it’s not in vanilla kernel.