summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD27
-rw-r--r--_ehh14
3 files changed, 59 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..cc2f8e27fe0a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = ehh
+ pkgdesc = Remember linux commands
+ pkgver = 1.1.1
+ pkgrel = 1
+ url = https://github.com/lennardv2/ehh
+ arch = any
+ license = MIT
+ depends = python-colorama
+ depends = python-click
+ depends = python-yaml
+ source = https://github.com/lennardv2/ehh/archive/refs/tags/v1.1.1.tar.gz
+ source = ehh-LICENSE::https://raw.githubusercontent.com/lennardv2/ehh/main/LICENSE
+ source = _ehh
+ sha256sums = 5a6bc3a9c3ba20080cf666cc51e6006fddb16bcae449d0e4a0cb5aa592ce299e
+ sha256sums = SKIP
+ sha256sums = SKIP
+
+pkgname = ehh
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..ecad75346bbc
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Robert Štětka <robert.stetka@gmail.com>
+pkgname=ehh
+pkgver=1.1.1
+pkgrel=1
+pkgdesc="Remember linux commands"
+arch=('any')
+url="https://github.com/lennardv2/ehh"
+license=('MIT')
+depends=('python-colorama' 'python-click' 'python-yaml')
+source=(
+ "https://github.com/lennardv2/$pkgname/archive/refs/tags/v$pkgver.tar.gz"
+ "$pkgname-LICENSE::https://raw.githubusercontent.com/lennardv2/ehh/main/LICENSE"
+ "_ehh"
+)
+sha256sums=(
+ '5a6bc3a9c3ba20080cf666cc51e6006fddb16bcae449d0e4a0cb5aa592ce299e'
+ 'SKIP'
+ 'SKIP'
+)
+
+package() {
+ cd "$srcdir"
+
+ install -Dm755 "$pkgname-$pkgver/$pkgname/cli.py" "$pkgdir/usr/bin/$pkgname"
+ install -Dm644 "_$pkgname" "$pkgdir/usr/share/zsh/site-functions/_$pkgname"
+ install -Dm644 $pkgname-LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
+}
diff --git a/_ehh b/_ehh
new file mode 100644
index 000000000000..045eed6eee65
--- /dev/null
+++ b/_ehh
@@ -0,0 +1,14 @@
+#compdef ehh
+_ehh() {
+ local -a ehh_commands
+ local -a ehh_aliases
+
+ ehh_commands=('add' 'get' 'help' 'ls' 'rm' 'run')
+ ehh_aliases=($(ehh ls | awk -F ' ' '{print $4}' | awk -F ' ' 'NF {print $1}'))
+
+ if [[ $words[2] != 'run' ]]; then
+ compadd $ehh_commands $ehh_aliases
+ else
+ compadd $ehh_aliases
+ fi
+}