summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD27
-rw-r--r--find-the-command.install38
3 files changed, 43 insertions, 38 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b933feb8ae91..64dad96a1618 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,18 @@
pkgbase = find-the-command
- pkgdesc = Advanced command-not-found hook for bash and zsh using the power of pacman
- pkgver = 1.4.2
+ pkgdesc = Advanced command-not-found hook for bash, fish and zsh using the power of pacman
+ pkgver = 2.0.1
pkgrel = 1
- url = https://github.com/agura-lex/find-the-command
+ url = https://github.com/pkasemir/find-the-command
install = find-the-command.install
arch = any
license = custom:WTFPL
depends = pacman>=5.0
- optdepends = sudo: for root access (needed for packages installation)
+ optdepends = fzf: highly recommended for package selection and previews
+ optdepends = pacman-contrib: for weekly pacman-filesdb-refresh.timer
+ optdepends = pkgfile: provides faster searches than pacman
+ optdepends = sudo: helpful for privilege elevation
options = docs
- source = https://github.com/agura-lex/find-the-command/archive/1.4.2.tar.gz
- md5sums = 3219bc4b574b2db1266154c75373670d
+ source = https://github.com/pkasemir/find-the-command/archive/2.0.1.tar.gz
+ sha256sums = aa312358f419a41ce48bc3c51f336892321fe3d8819b0e1a419c9eb2c8ba7593
pkgname = find-the-command
-
diff --git a/PKGBUILD b/PKGBUILD
index 7caec87495f8..bdbe4876ae20 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,23 +1,24 @@
-# Maintainer: Alexander Agura <agura@tfwno.gf>
+# Maintainer: Paul Kasemir <paul.kasemir@gmail.com>
pkgname=find-the-command
-pkgver=1.4.2
+pkgver=2.0.1
pkgrel=1
-pkgdesc="Advanced command-not-found hook for bash and zsh using the power of pacman"
+pkgdesc="Advanced command-not-found hook for bash, fish and zsh using the power of pacman"
arch=('any')
-url="https://github.com/agura-lex/find-the-command"
+url="https://github.com/pkasemir/find-the-command"
license=('custom:WTFPL')
depends=('pacman>=5.0')
-optdepends=('sudo: for root access (needed for packages installation)')
+optdepends=('fzf: highly recommended for package selection and previews'
+ 'pacman-contrib: for weekly pacman-filesdb-refresh.timer'
+ 'pkgfile: provides faster searches than pacman'
+ 'sudo: helpful for privilege elevation')
install=find-the-command.install
options=('docs')
-source=("https://github.com/agura-lex/$pkgname/archive/$pkgver.tar.gz")
-md5sums=('3219bc4b574b2db1266154c75373670d')
+source=("https://github.com/pkasemir/$pkgname/archive/$pkgver.tar.gz")
+sha256sums=('aa312358f419a41ce48bc3c51f336892321fe3d8819b0e1a419c9eb2c8ba7593')
package() {
- cd "$pkgname-$pkgver"
- rm .gitignore
- mkdir -p usr/share/licenses/$pkgname
- mv LICENSE usr/share/licenses/$pkgname/
- mv README.md usr/share/doc/$pkgname/
- cp -a * $pkgdir/
+ cd "$pkgname-$pkgver"
+ install -Dm644 README.md usr/share/doc/"${pkgname}"/ftc.* -t \
+ "$pkgdir/usr/share/doc/${pkgname}"
+ install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/${pkgname}"
}
diff --git a/find-the-command.install b/find-the-command.install
index 3b63ab8b71be..e10f83dec698 100644
--- a/find-the-command.install
+++ b/find-the-command.install
@@ -1,22 +1,29 @@
post_install() {
cat <<EOF
- >> To enable command-not-found hook for your shell
- >> add any of the following to your .bashrc or .zshrc file
- >> depending on the shell you use:
- >> for bash:
+ >> To enable command-not-found hook for your shell
+ >> source the proper file to your shell:
+
+ >> for bash (~/.bashrc):
source /usr/share/doc/find-the-command/ftc.bash
- >> for zsh:
+ >> for fish (~/.config/fish/config.fish):
+ source /usr/share/doc/find-the-command/ftc.fish
+ >> for zsh (~/.zshrc):
source /usr/share/doc/find-the-command/ftc.zsh
- >> You can also append 'su' option to use su instead of sudo
- >> for root access, 'noprompt' to disable installation
- >> prompt at all, or 'quiet' to decrease verbosity, e.g.:
+
+ >> There are several options you can use when sourcing:
+ * askfirst ask before searching the database for a command
+ * noprompt disable installation prompt
+ * noupdate disable "out of date" checks for db and files cache
+ * quiet decrease verbosity
+ * su use su instead of sudo for root access
+ >> Example:
source /usr/share/doc/find-the-command/ftc.zsh noprompt quiet
- >> It is necessary to create pacman files database, run
- # pacman -Fy
- >> You may also want to enable timer for regular
- >> pacman files database update:
- # systemctl enable pacman-files.timer
+ >> You may also want to enable timer for regular files database updates:
+ >> When using pacman (and have package "pacman-contrib" installed):
+ # systemctl enable pacman-filesdb-refresh.timer
+ >> Or when using pkgfile
+ # systemctl enable pkgfile-update.timer
EOF
}
@@ -24,11 +31,6 @@ post_upgrade() {
post_install
}
-pre_remove() {
- printf "\t>> Disabling pacman files systemd timer\n"
- systemctl disable pacman-files.timer
-}
-
post_remove() {
printf "\t>> Don't forget to remove the hook from your shell rc-file\n"
}