Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

搭配 fzf 食用本项目 #318

Open
CoderKeung opened this issue Dec 9, 2021 · 1 comment
Open

搭配 fzf 食用本项目 #318

CoderKeung opened this issue Dec 9, 2021 · 1 comment

Comments

@CoderKeung
Copy link

fl() {
  dir="You_Commands_Dir"
  commandsfile=$(find $dir -name '*.md' | sed "s#$dir/##; s/\.md//" | fzf --prompt='LinuxCommands> ' --preview "echo $dir/{}.md | xargs -r mdcat -p" | awk '{printf "'$dir'/%s.md", $1}')
  if [ $commandsfile ]; then
    mdcat -p $commandsfile
   else
     echo >> /dev/null
   fi
 }

截屏2021-12-09 上午9 12 13

@CoderKeung
Copy link
Author

需要软件:mdcatfzf , mdcat 也可以用 bat 或其他代替

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant