-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add full path output and clipboard #1
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@coresh thank your for your PR 🙏
Left 2 comments, it would be awesome if you address them!
@@ -46,14 +46,14 @@ qsb() { | |||
file="$( | |||
FZF_DEFAULT_COMMAND="$RG_PREFIX '$1'" \ | |||
fzf \ | |||
--preview="if [[ -n {} ]]; then if [[ -n {q} ]]; then ~/bin/bat-extras/src/batgrep.sh --color=always --terminal-width=105 --context=3 {q} {}; else bat --color=always {}; fi; fi" \ | |||
--preview="if [[ -n {} ]]; then if [[ -n {q} ]]; then /usr/bin/batgrep --color=always --terminal-width=105 --context=3 {q} {}; else bat --color=always {}; fi; fi" \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add an example how to install batgrep so you can call it like this, /usr/bin/batgrep
? I suppose it's simply symlink, but I think it will still be useful and more user friendly since all other tools in this function have installation instructions.
--disabled --query "$1" \ | ||
--bind "change:reload:sleep 0.1; $RG_PREFIX {q}" \ | ||
--bind "f3:execute(bat --paging=always --pager=\"less -j4 -R -F +/{q}\" --color=always {} < /dev/tty > /dev/tty)" \ | ||
--bind "f4:execute(code {})" \ | ||
--preview-window="70%:wrap" | ||
)" && | ||
echo "$file" | ||
RESULT="$(pwd)/${file}" && echo "${RESULT}" | xclip -selection clipboard && echo "${RESULT}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I know, xclip is not available in MacOS out of the box, so I would either add installation instruction or handle this case so it doesn't cause 'command not found error'
No description provided.