forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
app-misc/todo: add patch to fix bash completion.
Courtesy of Ferenc Erki <[email protected]>. Gentoo-Bug: https://bugs.gentoo.org/614400 Package-Manager: Portage-2.3.3, Repoman-2.3.1
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- ./todo_completion 2017-04-08 15:18:23.102736966 +0200 | ||
+++ ./todo_completion 2017-04-08 15:18:56.839725605 +0200 | ||
@@ -85,6 +85,9 @@ | ||
} | ||
complete -F _todo todo.sh | ||
|
||
+# Gentoo bug 614400 | ||
+complete -F _todo todotxt | ||
+ | ||
# If you define an alias (e.g. "t") to todo.sh, you need to explicitly enable | ||
# completion for it, too: | ||
#complete -F _todo t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# Copyright 1999-2017 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
|
||
EAPI=6 | ||
|
||
inherit bash-completion-r1 | ||
|
||
DESCRIPTION="A CLI-based TODO list manager" | ||
HOMEPAGE="http://todotxt.com/" | ||
SRC_URI="https://github.com/ginatrapani/${PN}.txt-cli/archive/v${PV}.tar.gz -> ${P}.tar.gz" | ||
|
||
LICENSE="GPL-3" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="test" | ||
|
||
RDEPEND="app-shells/bash" | ||
|
||
PATCHES=( "${FILESDIR}/${P}-fix-bash-completion.patch" ) | ||
|
||
S="${WORKDIR}/${PN}.txt-cli-${PV}" | ||
|
||
DOCS=( README.textile CONTRIBUTING.md LICENSE todo.cfg ) | ||
|
||
src_test() { | ||
make test || die "tests failed" | ||
} | ||
|
||
src_install() { | ||
dobin "${PN}.sh" | ||
dosym "/usr/bin/${PN}.sh" "/usr/bin/${PN}txt" | ||
newbashcomp "${PN}_completion" "${PN}.sh" | ||
bashcomp_alias "${PN}.sh" "${PN}txt" | ||
einstalldocs | ||
} |