Package Details: hledger-ui-bin 1.40-5

Git Clone URL: https://aur.archlinux.org/hledger-bin.git (read-only, click to copy)
Package Base: hledger-bin
Description: Curses-style terminal interface for the hledger accounting system
Upstream URL: http://hledger.org
Keywords: hledger ledger
Licenses: GPL
Conflicts: hledger-ui
Provides: hledger-ui
Submitter: ccat3z
Maintainer: dude
Last Packager: dude
Votes: 6
Popularity: 0.23
First Submitted: 2020-08-22 05:39 (UTC)
Last Updated: 2024-09-17 19:30 (UTC)

Latest Comments

1 2 3 4 Next › Last »

gesh commented on 2024-09-17 18:05 (UTC)

Note the installation instructions in the completion file -- it should be symlinked to also be pointed to by /usr/share/bash-completion/completions/hledger-{ui,web}. Currently, the only way to load the completion for eg hledger-ui is to first do hledger <TAB> -- this will pull in the completion file, which will additionally configure completion for hledger-ui and hledger-web.

diff --git a/PKGBUILD b/PKGBUILD
index cb9759e..4c6d661 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,7 +2,7 @@

 pkgver=1.40
 pkgname=(hledger-bin hledger-ui-bin hledger-web-bin)
-pkgrel=4
+pkgrel=5
 pkgdesc="Easy-to-use command-line/curses/web plaintext accounting tool"
 arch=(x86_64)
 url="http://hledger.org"
@@ -48,6 +48,8 @@ package_hledger-ui-bin() {
     depends+=(zlib)

     install -Dm 755 ./hledger-ui "$pkgdir/usr/bin/hledger-ui"
+    mkdir -p "$pkgdir/usr/share/bash-completion/completions/"
+    ln -sr "$pkgdir/usr/share/bash-completion/completions/hledger"{,-ui}
     install -Dm 644 hledger-ui.1 -t "$pkgdir/usr/share/man/man1/"
 }

@@ -58,5 +60,7 @@ package_hledger-web-bin() {
     depends+=(zlib)

     install -Dm 755 ./hledger-web "$pkgdir/usr/bin/hledger-web"
+    mkdir -p "$pkgdir/usr/share/bash-completion/completions/"
+    ln -sr "$pkgdir/usr/share/bash-completion/completions/hledger"{,-web}
     install -Dm 644 hledger-web.1 -t "$pkgdir/usr/share/man/man1/"
 }

dude commented on 2024-09-14 16:03 (UTC)

@tee Thanks, I've added that as an optdepends just now

tee commented on 2024-09-14 15:42 (UTC)

This optionally depends on asciinema, for hledger demo 2.

gesh commented on 2024-09-10 19:08 (UTC)

Ah, right. I had considered that a static resource (i.e. not something making this a VCS package), but of course you're right to want to get the version of the completion at that tag. Also, TIL that syntax to get the file at a given tag, thanks!

dude commented on 2024-09-10 18:39 (UTC)

@gesh Fixed it for you...just needed to specify hledger-${pkgver} as the git tag, instead of the master branch.

dude commented on 2024-09-10 15:31 (UTC) (edited on 2024-09-10 15:38 (UTC) by dude)

@gesh Can you change your patch to pull hledger-completion.bash from the 1.40 source release rather than git master?

The restriction is noted here: https://wiki.archlinux.org/title/AUR_submission_guidelines#Rules_of_submission

Packages that build from a version control system and are not tied to a specific version need to have an appropriate suffix, -git for git and so on

gesh commented on 2024-09-10 15:17 (UTC)

I don't understand the reasoning for this restriction -- yes, this makes the PKGBUILD sensitive to changes to the completions, but they haven't changed in 2 years. I have prodded upstream on this, hopefully this gets resolved one way or the other https://github.com/simonmichael/hledger/issues/986

dude commented on 2024-09-10 09:13 (UTC)

@gesh Can't use files from a git repo for this, the source files need to be taken from an official tarball release. Because if the hledger-completion.bash file gets updated upstream, this package will fail to build (shasum will be different).

gesh commented on 2024-07-09 14:40 (UTC) (edited on 2024-07-09 14:43 (UTC) by gesh)

Please add the bash completion:

diff --git a/PKGBUILD b/PKGBUILD
index f0818d5..0a9d6ff 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,10 +11,10 @@ depends=('gmp' 'ncurses5-compat-libs')
 makedepends=('coreutils')
 source=(
     hledger-${pkgver}.tar.gz::https://github.com/simonmichael/hledger/releases/download/${pkgver}/hledger-linux-x64.tar.gz
+    https://raw.githubusercontent.com/simonmichael/hledger/master/hledger/shell-completion/hledger-completion.bash
 )
-sha256sums=(
-    bbeef13b7cea31e5896cfcc5b2563b96187673bddc29f243815814a44f25a139
-)
+sha256sums=('bbeef13b7cea31e5896cfcc5b2563b96187673bddc29f243815814a44f25a139'
+            '662abb7f39b9582315a6d014012fdff56664e8cf6b2665f1d96ae3285930d4ce')

 prepare() {
     cd $srcdir
@@ -28,6 +28,8 @@ package_hledger-bin() {
     depends+=(glibc)

     install -Dm 755 ./hledger "$pkgdir/usr/bin/hledger"
+    install -Dm 644 hledger-completion.bash \
+        "$pkgdir/usr/share/bash-completion/completions/hledger"
 }

 package_hledger-ui-bin() {

behonest commented on 2022-03-05 09:10 (UTC)

Please update 1.25: https://github.com/simonmichael/hledger/releases/tag/1.25