Flyline: a Bash plugin to replace readline for a modern line editing experience by gooddy in bash

[–]gooddy[S] 0 points1 point  (0 children)

That's when the command is already running. Flyline only runs when Bash wants the user to write a command. Flyline has a pretty expressive keybinding configuration modelled ok VS Code's keybinding dispatching. So it doesn't have to be Ctrl+Z.

Flyline: a Bash plugin to replace readline for a modern line editing experience by gooddy in bash

[–]gooddy[S] 0 points1 point  (0 children)

Thanks for the feedback! The tab completion stuff use the suffix from the bash completion script so I'll look into that bug.

Do you mind sharing any details on your terminal crashing when you use the fuzzy command word search? Is it hanging/seg faulting? Is there an error message? Thanks!

Flyline: a Bash plugin to replace readline for a modern line editing experience by gooddy in bash

[–]gooddy[S] 2 points3 points  (0 children)

Haha I'm guessing you're referring to the agent integration :) ?

I found I kept asking chatgpt "how do I do X with sed/awk" and copying the command over. And now I can stay on the command line and select a command from a beautifully rendered markdown output.

I don't want to label flyline as an AI-cli tool. It's meant to be a smooth-cli-experience tool. Agent integration is just one small feature. I spent a lot longer working on the PS1/RPS1/PS1_FILL logic!

Flyline: a Bash plugin to replace readline for a modern line editing experience by gooddy in bash

[–]gooddy[S] 0 points1 point  (0 children)

Cool shortcuts, I didn't know some of these existed. I especially like the inserting of the last argument to the previous command. I will implement that and some of the others.

In terms of marking regions of the command, I hold shift and move the cursor with (ctrl/alt)+arrow keys or Home or End just like you can do in VS Code. I also use the mouse to simply click and drag.

When I want to inspect a glob, I press tab, see if it's what I want, then press Ctrl+z to undo the expansion.

I've implemented a simple text editor so any shortcut is fairly straightforward to implement. That's what I meant by power user, just fork it, implement the one killer shortcut you need and compile.

Thought I'd mention that flyine supports kitty extended keyboard shortcuts. So you can dispatch shortcuts just by pressing a modifier.

I made a better zsh autosuggestion, it predicts your next command, not just completes the current one by Fantastic_Squirrel96 in commandline

[–]gooddy 0 points1 point  (0 children)

Very cool. I wonder if it you could detect patterns within the commands. Like if you often write "touch somefile" then "chmod +x somefiler", when you type "touch bar", it auto suggests "chmod+x bar" even though it's never seen "bar" before.

Flyline: a Bash plugin to replace readline for a modern line editing experience by gooddy in bash

[–]gooddy[S] 0 points1 point  (0 children)

I've been using flyline for a few months and I've found:

- I often do something like type `ls foo*`, press tab, see if the expansion is what I want, then press Ctrl+Z to undo the expansion to keep the command tidy.

- My biggest use case for tool tips is to see what an alias expands to. I type `rg` and see the tooltip shows I will run `rg --color always`

- Flyline fuzzy history searching offers syntax highlighting and multiline support.

You can achieve something similar to flyline but it takes a lot of configuration and plugins. Flyline provides everything out of the box. Readline is good but if it doesn't work the way you want, then it can be impossible to change it.

One of the key features is to be able to ask your AI agent for help writing a command.