first commit
This commit is contained in:
commit
83086fd009
3 changed files with 44 additions and 0 deletions
30
PKGBUILD
Normal file
30
PKGBUILD
Normal file
|
@ -0,0 +1,30 @@
|
|||
# Maintainer: Dimitri Kaparis <dimitri@kaparis.name>
|
||||
|
||||
pkgname=fuz-git
|
||||
_pkgname=${pkgname%-git}
|
||||
pkgver=r216.cbc8164
|
||||
pkgrel=1
|
||||
pkgdesc="Blazingly fast text, file and folder fuzzy search tool"
|
||||
arch=(any)
|
||||
url="https://github.com/Magnushhoie/fuz"
|
||||
license=('MIT')
|
||||
depends=('fzf' 'ripgrep' 'bat')
|
||||
makedepends=('git')
|
||||
install="$_pkgname.install"
|
||||
source=("git+$url"
|
||||
"fuz-aliases")
|
||||
sha256sums=('SKIP'
|
||||
'5856915b7f6303cef894ada246e365bd0e78edbcf3b9bc3446ecc44f3b4cd8b3')
|
||||
|
||||
pkgver() {
|
||||
cd "$srcdir/$_pkgname"
|
||||
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
|
||||
}
|
||||
|
||||
package() {
|
||||
install -D fuz-aliases $pkgdir/etc/bash/bashrc.d/fuz
|
||||
cd "$srcdir/$_pkgname"
|
||||
install -Dm 755 $_pkgname fuz_scripts.sh -t $pkgdir/usr/bin/
|
||||
install -D README.md $pkgdir/usr/share/doc/$_pkgname/README.md
|
||||
install -D LICENSE $pkgdir/usr/share/licenses/$_pkgname/LICENSE
|
||||
}
|
8
fuz-aliases
Normal file
8
fuz-aliases
Normal file
|
@ -0,0 +1,8 @@
|
|||
fif() {
|
||||
if [ ! "$#" -gt 0 ]; then echo "Need a string to search for!"; return 1; fi
|
||||
rg --files-with-matches --no-messages "$1" | fzf --preview "highlight -O ansi -l {} 2> /dev/null | rg --colors 'match:bg:yellow' --ignore-case --pretty --context 10 '$1' || rg --ignore-case --pretty --context 10 '$1' {}"
|
||||
}
|
||||
|
||||
alias fz='fuz --sorttime'
|
||||
alias fze='fuz --edit'
|
||||
alias fzd='fuz --dir-search'
|
6
fuz.install
Normal file
6
fuz.install
Normal file
|
@ -0,0 +1,6 @@
|
|||
post_install() {
|
||||
echo "To set default fuz directory, add to ~/.bashrc or ~/.zshrc:"
|
||||
echo
|
||||
echo "alias fuz='fuz --path /path/to/notes"
|
||||
echo
|
||||
}
|
Loading…
Add table
Reference in a new issue