mirror of
https://github.com/gentoo-mirror/guru.git
synced 2025-04-20 23:46:14 -04:00
app-shells/igr: new package
Signed-off-by: Vitaly Zdanevich <zdanevich.vitaly@ya.ru>
This commit is contained in:
parent
f7038f4d3d
commit
1ef26f54df
1
app-shells/igr/Manifest
Normal file
1
app-shells/igr/Manifest
Normal file
@ -0,0 +1 @@
|
|||||||
|
DIST igr 552 BLAKE2B a632836b25764e196b5fffa129a0a163e89d75e2ff84479f780d9375774b64b6e3e04bbe34de65aa0d4b12a68ef4acd1c7653423ab6fe828e2ceb48b4146db95 SHA512 4e8be976248e4ba625ce9a360ecc99c9572ce2e2c6b7a9035d9171620a5dab21ef64b9b13e904ffe8f2f886c198ed594dd2477058f7727d8749791f6670747e6
|
28
app-shells/igr/files/vim-open-current-line.patch
Normal file
28
app-shells/igr/files/vim-open-current-line.patch
Normal file
@ -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
|
36
app-shells/igr/igr-9999.ebuild
Normal file
36
app-shells/igr/igr-9999.ebuild
Normal file
@ -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"
|
||||||
|
}
|
12
app-shells/igr/metadata.xml
Normal file
12
app-shells/igr/metadata.xml
Normal file
@ -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>
|
Loading…
x
Reference in New Issue
Block a user