magicant / yash

Yet another shell
http://magicant.github.io/yash/
GNU General Public License v2.0
301 stars 28 forks source link

Autofill the command line #23

Open magicant opened 10 months ago

magicant commented 10 months ago

(Feature request migrated from https://osdn.net/projects/yash/ticket/43094)

Hello, yash is excellent, thank you for it. One alias I like is the following history alias:

alias h="history | sort --reverse --numeric-sort | fzy | sed 's/\[[:digit:]]*[[:space:]]*//' | tr -d '\n' | xclip -selection clipboard"

That uses fzy to search the history, and when something is selected it gets copied to the clipboard. However, instead of copying it to the clipboard, I would like to send it to yash's command line prompt, so I can press enter and run the command, or edit the command before running it.

Is there a way to automatically fill in the command line prompt?