sman icon indicating copy to clipboard operation
sman copied to clipboard

Using sman with fzf

Open riscie opened this issue 5 years ago • 1 comments

Hi there

Nice tool you have there, I really like it. :+1: I just wanted to add how I started to use sman togheter with fzf (https://github.com/junegunn/fzf):

.zshrc


#sman
alias s=sman
function sman_show() {
    sman ls | fzf --reverse --ansi --bind 'enter:execute(snippet=$(echo {} | awk '\''{print $1}'\'' ); echo $snippet ;sman run $snippet)+abort'
    zle redisplay
}

zle -N sman_show
bindkey '^q' sman_show

this allows one to use the keyboard-shortcut (ctrl-q here) to do the following:

Maybe it is of help. I could make a pr for the readme, but the readme is something a bit more personal to the original author, which is why I assume if you would like to add it, you could phrase it in your own words.

riscie avatar May 27 '19 11:05 riscie

Hi This is quite cool. Feel free to add new PR. I barely maintain this project anyway 😬

tokozedg avatar May 27 '19 14:05 tokozedg