diff --git a/0001-fix-revert-completion-using-dom.patch b/0001-fix-revert-completion-using-dom.patch new file mode 100644 index 0000000..9f473c7 --- /dev/null +++ b/0001-fix-revert-completion-using-dom.patch @@ -0,0 +1,30 @@ +From 1ed5251d8abdb9beb2c599075c611791455d9060 Mon Sep 17 00:00:00 2001 +From: "Ankur Sinha (Ankur Sinha Gmail)" +Date: Tue, 9 Jan 2024 11:38:01 +0000 +Subject: [PATCH] fix: revert completion using dom + +Seems to break tag completion. + +https://github.com/GothenburgBitFactory/timewarrior/issues/581 + +Signed-off-by: Ankur Sinha (Ankur Sinha Gmail) +--- + completion/timew-completion.bash | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/completion/timew-completion.bash b/completion/timew-completion.bash +index 160a3dd3..8200d56c 100644 +--- a/completion/timew-completion.bash ++++ b/completion/timew-completion.bash +@@ -42,7 +42,7 @@ function __get_ids() + + function __get_tags() + { +- timew get dom.tracked.tags "${TIMEW_COMPLETION_TAGS_RANGE:-":all"}" ++ timew tags | tail -n +4 -- | sed -E "s;(.*)[[:space:]]+-($|%.*);\1;" + } + + function __get_extensions() +-- +2.43.0 + diff --git a/4a4110de8e54c59859ada42930140fa82d18e1f2.patch b/4a4110de8e54c59859ada42930140fa82d18e1f2.patch deleted file mode 100644 index dd2c1e0..0000000 --- a/4a4110de8e54c59859ada42930140fa82d18e1f2.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 4a4110de8e54c59859ada42930140fa82d18e1f2 Mon Sep 17 00:00:00 2001 -From: Benedikt Fein -Date: Wed, 3 May 2023 20:36:45 +0200 -Subject: [PATCH] Fix man page build for out-of-source builds - -Fixes #461 - -Signed-off-by: Benedikt Fein ---- - doc/man1/CMakeLists.txt | 3 ++- - doc/man7/CMakeLists.txt | 3 ++- - 2 files changed, 4 insertions(+), 2 deletions(-) - -diff --git a/doc/man1/CMakeLists.txt b/doc/man1/CMakeLists.txt -index 7c54fd9f..e5fdca89 100644 ---- a/doc/man1/CMakeLists.txt -+++ b/doc/man1/CMakeLists.txt -@@ -1,10 +1,11 @@ - cmake_minimum_required (VERSION 2.8.12) - --file (GLOB DOC_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/*.1.adoc") -+file (GLOB DOC_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.1.adoc") - set (DOC_FILES) - - foreach (SRC ${DOC_SOURCES}) - string (REPLACE ".adoc" "" OUTPUT_FILE_NAME "${SRC}") -+ string (REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" OUTPUT_FILE_NAME "${OUTPUT_FILE_NAME}") - - add_custom_command ( - OUTPUT "${OUTPUT_FILE_NAME}" -diff --git a/doc/man7/CMakeLists.txt b/doc/man7/CMakeLists.txt -index 6866b119..1d150ef0 100644 ---- a/doc/man7/CMakeLists.txt -+++ b/doc/man7/CMakeLists.txt -@@ -1,10 +1,11 @@ - cmake_minimum_required (VERSION 2.8.12) - --file (GLOB DOC_SOURCES "${CMAKE_CURRENT_BINARY_DIR}/*.7.adoc") -+file (GLOB DOC_SOURCES "${CMAKE_CURRENT_SOURCE_DIR}/*.7.adoc") - set (DOC_FILES) - - foreach (SRC ${DOC_SOURCES}) - string (REPLACE ".adoc" "" OUTPUT_FILE_NAME "${SRC}") -+ string (REPLACE "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" OUTPUT_FILE_NAME "${OUTPUT_FILE_NAME}") - - add_custom_command ( - OUTPUT "${OUTPUT_FILE_NAME}" diff --git a/timew.spec b/timew.spec index fc047c6..b55c4d0 100644 --- a/timew.spec +++ b/timew.spec @@ -10,6 +10,10 @@ URL: https://timewarrior.net/ Source0: https://github.com/GothenburgBitFactory/timewarrior/releases/download/v%{version}/%{name}-%{version}.tar.gz Source1: README.Fedora +# https://github.com/lauft/timew-bashcompletion/pull/10 +Patch: 0001-fix-revert-completion-using-dom.patch + +BuildRequires: git-core BuildRequires: cmake gcc-c++ BuildRequires: rubygem-asciidoctor @@ -22,7 +26,7 @@ Please read the /usr/share/doc/timew/README.Fedora file on using the included extensions. %prep -%autosetup -p1 +%autosetup -S git cp -v %{SOURCE1} . chmod -x doc/holidays/* for lib in doc/holidays/*; do