#Readline

Karl Voit :emacs: :orgmode:publicvoit@graz.social
2025-05-10

Planned to add file name descriptions and #tags to my recent photos while taking a train ride.

Unfortunately, tab-completion of my Python-based #tagging tool doesn't work at the moment and I have no idea why. This makes my tagging session an unpleasant one.

So I created a bug report for it: github.com/novoid/filetags/iss

The only thing that worries me is that it's my own tool, that has this bug and I don't know how to fix it. 😔 🤦‍♂️

Could be related to #readline, terminal emulator, pyreadline version, ... 🤷

#filetags

Kevin Bowen (has moved) :xfce:kevinbowen@fosstodon.org
2025-04-02

More tech notes to myself

A very brief introduction to the #Readline library, customizing the #Bash shell prompt with mode indicators, and the vi editing mode.

Customizing the Bash command prompt for vi editing mode
suburbanalities.blogspot.com/2

#Shell #vi #vim #inputrc #cli

My friend and I are both #iterm2 users. We’re both #Vim users. He uses remote systems all the time and customizes as little as he possibly can because he has much less control over those remote systems. I customize way too much. We both use #bash (though locally, he uses #zsh). Therefore, we both use #readline. I prefer vim-mode on the #commandline. He uses the default, emacs-mode. We both realized we weren’t really using much of the tools those edit modes gave us so we found cheat sheets and started experimenting. For him, alt-b should go back a word, but it didn’t. It worked when I tried that mode. We tried all kinds of solutions for him including sharing our profiles. In the end the thing that succeeded was configuring his iTerm to send "Esc+” when he used the option key. So really, Esc-b went back a word, not alt-b. Mine worked because I was already configured that way.

Here’s something that puts your readline edit-mode into your prompt. I probably didn’t need to do this. I’m a #Vim user (really #NeoVim) and so I have a `.inputrc` that makes my #commandline edit-mode (because of #readline) always be #vi. This is for #bash. It may work in other shells, I don’t know. I use #starship. The actual command I wrote uses #ripgrep. At least twenty other ways you could do it. I put all the changes into a gist: gist.github.com/wolf/e2bd12615

Most people never change from the default edit-mode. If they do, they probably don’t switch back and forth. Starship narrows the field further. Almost certainly this is of no use to you unless you want to learn a little about some of the pieces. Enjoy anyway.

Kevin Bowen (has moved) :xfce:kevinbowen@fosstodon.org
2025-02-02

A tiny #vi #readline tip

Do you use `set -o vi` in your shell and can't remember whether you are in insert or edit/cmd mode?

Add the following to your .inputrc to put an indicator at the beginning of your prompt to remind you.

# Add mode indicators to command line
set show-mode-in-prompt on
set vi-ins-mode-string "+"
set vi-cmd-mode-string ":"

#vim #shell #bash

Screenshot of a command prompt with output from .inputrc file and two command prompts showing the difference between the `set o vi` modes:
# Add mode indicators to command line
set show-mode-in-prompt on
set vi-ins-mode-string "+"
set vi-cmd-mode-string ":"
+kbowen@leeuin:~$ 
:kbowen@leeuin:~$ cd ~/docs/reading/non-fiction/
2024-12-14

Should I use #readline rlwrap in my aed? Or does that make me un-#ed-ucated barbarian?

2024-12-14
#Profanity is using #readline.

There are a lot of helpful Key Bindings: see man 3 readline.
2024-11-11

Today I am really appreciating #gnu #readline. I'm switching between a shell and multiple different cli applications and the same navigation commands just work in all of them.

2024-08-11

[Перевод] Почему порой так сложно вводить текст в терминал

Как-то раз я спросила у пользователей Mastodon, что их не устраивает в работе с терминалом, и одним из ярких замечаний оказалось «редактирование уже введённой команды». Мне эта проблема тоже реально знакома. Несмотря на то, что ввод текста и его редактирование является «базовой» задачей, мне потребовалось около 15 лет каждодневной работы с терминалом, чтобы привыкнуть к использованию Ctrl+A для перехода к началу строки (или Ctrl+E для перехода в конец — я использовала вместо этого Home / End ). Так что сегодня речь пойдёт о том, что ввод текста порой вызывает сложности. Я также поделюсь с вами кое-какими советами, которые сама была бы рада услышать давно.

habr.com/ru/companies/ruvds/ar

#ruvds_перевод #vim #vi #редакторы_текста #readline #командная_строка #cli #linux

2024-07-15

Learned about rlwrap from the recent @b0rk post, which has made the OCaml REPL & debugger vastly nicer to use - in stock form it doesn't integrate GNU Readline, so you can't do nice things like use arrow keys for text navigation. On the other hand maybe this is against the spirit of GNU Readline, which was intended as a big carrot to get more software to be GPL. OCaml tooling is LGPL from what I can tell. Does anybody know more about the background here?

#ocaml #readline #gpl

Inautiloinautilo
2024-07-09


Entering text in the terminal is complicated · What you can do to enhance the input experience ilo.im/15zfux

_____

Mehrad :kde: :emacs: :rstats:Mehrad@fosstodon.org
2024-07-09

I didn't know that the #readline (which many CLI tools use these days) and #bash projects are maintained by one single person named Chet Ramey. I always naively thought they are either maintained by one of these mega corps or by GNU folks collectively.

This is literally yet another example of XKCD 2347:

xkcd.com/2347/

I think his Fediverse account is @chetramey although it is not a verified account and hence we cannot be sure, but the description match.

I have to tip my hat to him.

Some Bits: Nelson's Linkblogsomebitslinks@tech.lgbt
2024-07-08

tty text input: Details of all the various ways shells and terminals read lines of input from the user and let them edit what they're typing
jvns.ca/blog/2024/07/08/readli
#readline #linux #shell #tty #tui #ui #+

Client Info

Server: https://mastodon.social
Version: 2025.04
Repository: https://github.com/cyevgeniy/lmst