* [gentoo-commits] repo/proj/guru:master commit in: app-shells/igr/files/, app-shells/igr/
@ 2024-04-08 11:44 Julien Roy
0 siblings, 0 replies; 2+ messages in thread
From: Julien Roy @ 2024-04-08 11:44 UTC (permalink / raw
To: gentoo-commits
commit: 1ef26f54dfe3baa0da425327a147fdee476c488a
Author: Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
AuthorDate: Mon Apr 8 08:22:19 2024 +0000
Commit: Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Mon Apr 8 08:22:19 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=1ef26f54
app-shells/igr: new package
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly <AT> ya.ru>
app-shells/igr/Manifest | 1 +
app-shells/igr/files/vim-open-current-line.patch | 28 ++++++++++++++++++
app-shells/igr/igr-9999.ebuild | 36 ++++++++++++++++++++++++
app-shells/igr/metadata.xml | 12 ++++++++
4 files changed, 77 insertions(+)
diff --git a/app-shells/igr/Manifest b/app-shells/igr/Manifest
new file mode 100644
index 0000000000..649c24dbab
--- /dev/null
+++ b/app-shells/igr/Manifest
@@ -0,0 +1 @@
+DIST igr 552 BLAKE2B a632836b25764e196b5fffa129a0a163e89d75e2ff84479f780d9375774b64b6e3e04bbe34de65aa0d4b12a68ef4acd1c7653423ab6fe828e2ceb48b4146db95 SHA512 4e8be976248e4ba625ce9a360ecc99c9572ce2e2c6b7a9035d9171620a5dab21ef64b9b13e904ffe8f2f886c198ed594dd2477058f7727d8749791f6670747e6
diff --git a/app-shells/igr/files/vim-open-current-line.patch b/app-shells/igr/files/vim-open-current-line.patch
new file mode 100644
index 0000000000..bd18f4a0d5
--- /dev/null
+++ b/app-shells/igr/files/vim-open-current-line.patch
@@ -0,0 +1,28 @@
+diff --git a/igr b/igr
+index 73a6e8c..e23082a 100755
+--- a/igr
++++ b/igr
+@@ -1,11 +1,11 @@
+ #!/usr/bin/env bash
+
+-declare preview='bat --color=always --style=header,numbers -H {2} {1} | grep -C3 {q}'
++declare preview='bat --color=always --style=header,numbers -H {2} {1} | grep --context 20 {q}'
+
+ while getopts ':l' x; do
+ case "$x" in
+ l) list_files=1
+- preview='bat --color=always --style=header,numbers {1} | grep -C3 {q}'
++ preview='bat --color=always --style=header,numbers {1} | grep --context 20 {q}'
+ ;;
+ esac
+ done
+@@ -18,5 +18,7 @@ fzf -d: \
+ --query="$1" \
+ --phony \
+ --bind="change:reload:rg -n ${list_files:+-l} --color=always {q}" \
+---bind='enter:execute:v {1}' \
+---preview="[[ -n {1} ]] && $preview"
++--bind='enter:execute:echo "vim {1}:{2}" && vim {1}:{2}' \
++--preview="[[ -n {1} ]] && $preview"
++
++ # echo to save in shell history
diff --git a/app-shells/igr/igr-9999.ebuild b/app-shells/igr/igr-9999.ebuild
new file mode 100644
index 0000000000..ad7b1b85fd
--- /dev/null
+++ b/app-shells/igr/igr-9999.ebuild
@@ -0,0 +1,36 @@
+# Copyright 2024 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+DESCRIPTION="Interactive rg (ripgrep) wrapper in fzf: Interactive grep (search)"
+HOMEPAGE="https://github.com/DanielFGray/fzf-scripts"
+SRC_URI="https://raw.githubusercontent.com/DanielFGray/fzf-scripts/master/$PN"
+
+LICENSE="GPL-3"
+SLOT=0
+
+RDEPEND="
+ sys-apps/ripgrep
+ app-shells/fzf
+ sys-apps/bat
+ app-editors/vim
+"
+
+S="$WORKDIR"
+
+src_unpack() {
+ cp "$DISTDIR/$PN" "$WORKDIR/" || die
+}
+
+PATCHES=(
+ "$FILESDIR/vim-open-current-line.patch"
+)
+
+src_install() {
+ dobin "${PN}"
+}
+
+pkg_postinst() {
+ einfo "For opening a file on the specific line - install https://github.com/bogado/file-line"
+}
diff --git a/app-shells/igr/metadata.xml b/app-shells/igr/metadata.xml
new file mode 100644
index 0000000000..8b56a5df77
--- /dev/null
+++ b/app-shells/igr/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <name>Vitaly Zdanevich</name>
+ <email>zdanevich.vitaly@ya.ru</email>
+ </maintainer>
+ <upstream>
+ <remote-id type="github">DanielFGray/fzf-scripts</remote-id>
+ <bugs-to>https://github.com/DanielFGray/fzf-scripts/issues</bugs-to>
+ </upstream>
+</pkgmetadata>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [gentoo-commits] repo/proj/guru:master commit in: app-shells/igr/files/, app-shells/igr/
@ 2024-04-25 21:49 Julien Roy
0 siblings, 0 replies; 2+ messages in thread
From: Julien Roy @ 2024-04-25 21:49 UTC (permalink / raw
To: gentoo-commits
commit: 84cb4e4f65299cc71776688e49476ce178c175fc
Author: Vitaly Zdanevich <zdanevich.vitaly <AT> ya <DOT> ru>
AuthorDate: Thu Apr 25 06:52:27 2024 +0000
Commit: Julien Roy <julien <AT> jroy <DOT> ca>
CommitDate: Thu Apr 25 06:52:27 2024 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=84cb4e4f
app-shells/igr: remove patch - because fixed on upstream
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly <AT> ya.ru>
app-shells/igr/Manifest | 2 +-
app-shells/igr/files/vim-open-current-line.patch | 35 ------------------------
app-shells/igr/igr-9999.ebuild | 9 ++----
3 files changed, 4 insertions(+), 42 deletions(-)
diff --git a/app-shells/igr/Manifest b/app-shells/igr/Manifest
index 649c24dbab..3719555f86 100644
--- a/app-shells/igr/Manifest
+++ b/app-shells/igr/Manifest
@@ -1 +1 @@
-DIST igr 552 BLAKE2B a632836b25764e196b5fffa129a0a163e89d75e2ff84479f780d9375774b64b6e3e04bbe34de65aa0d4b12a68ef4acd1c7653423ab6fe828e2ceb48b4146db95 SHA512 4e8be976248e4ba625ce9a360ecc99c9572ce2e2c6b7a9035d9171620a5dab21ef64b9b13e904ffe8f2f886c198ed594dd2477058f7727d8749791f6670747e6
+DIST igr 339 BLAKE2B a9c091ec4cc3c80648e394d5d03e60bce52980b86cbb7f1c5036cf987dc871b9266a9a40482fffab6dacf69bda336eb8c339e62a5571d52cbac6123805d5a52f SHA512 a779e668defeeab4c81727e985ba980d88c74d8764e74352f78c844e5c21afa3d034115588a48c93836924463141f0db612214ae6d3737a6267fd7dad8611c14
diff --git a/app-shells/igr/files/vim-open-current-line.patch b/app-shells/igr/files/vim-open-current-line.patch
deleted file mode 100644
index 6a83ede8cd..0000000000
--- a/app-shells/igr/files/vim-open-current-line.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-This patch change calling of v to $EDITOR, see https://github.com/DanielFGray/fzf-scripts/issues/26
-
-And add more context to the search.
-
-Also open a file on the specific line
-
-diff --git a/igr b/igr
-index 73a6e8c..e23082a 100755
---- a/igr
-+++ b/igr
-@@ -1,11 +1,11 @@
- #!/usr/bin/env bash
-
--declare preview='bat --color=always --style=header,numbers -H {2} {1} | grep -C3 {q}'
-+declare preview='bat --color=always --style=header,numbers -H {2} {1} | grep --context 999 {q}'
-
- while getopts ':l' x; do
- case "$x" in
- l) list_files=1
-- preview='bat --color=always --style=header,numbers {1} | grep -C3 {q}'
-+ preview='bat --color=always --style=header,numbers {1} | grep --context 999 {q}'
- ;;
- esac
- done
-@@ -18,5 +18,7 @@ fzf -d: \
- --query="$1" \
- --phony \
- --bind="change:reload:rg -n ${list_files:+-l} --color=always {q}" \
----bind='enter:execute:v {1}' \
----preview="[[ -n {1} ]] && $preview"
-+--bind='enter:execute:echo "$EDITOR {1}:{2}" && $EDITOR {1}:{2}' \
-+--preview="[[ -n {1} ]] && $preview" \
-+--preview-window="/2"
-+
-+ # echo to save in shell history
diff --git a/app-shells/igr/igr-9999.ebuild b/app-shells/igr/igr-9999.ebuild
index 629636be83..596613cfc2 100644
--- a/app-shells/igr/igr-9999.ebuild
+++ b/app-shells/igr/igr-9999.ebuild
@@ -7,7 +7,10 @@ DESCRIPTION="Interactive rg (ripgrep) wrapper in fzf: Interactive GRep (search)"
HOMEPAGE="https://github.com/DanielFGray/fzf-scripts"
SRC_URI="https://raw.githubusercontent.com/DanielFGray/fzf-scripts/master/$PN"
+S="$WORKDIR"
+
LICENSE="GPL-3"
+
SLOT=0
RDEPEND="
@@ -16,16 +19,10 @@ RDEPEND="
sys-apps/bat
"
-S="$WORKDIR"
-
src_unpack() {
cp "$DISTDIR/$PN" "$WORKDIR/" || die
}
-PATCHES=(
- "$FILESDIR/vim-open-current-line.patch"
-)
-
src_install() {
dobin "${PN}"
}
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-04-25 21:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-25 21:49 [gentoo-commits] repo/proj/guru:master commit in: app-shells/igr/files/, app-shells/igr/ Julien Roy
-- strict thread matches above, loose matches on Subject: below --
2024-04-08 11:44 Julien Roy
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox