From a95bbb769657d60819c7f5bc747491b0bb5ab6d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 10 Aug 2025 10:38:26 +0300 Subject: [PATCH 1/3] docs(README): use datadir, not datarootdir in install tips https://github.com/scop/bash-completion/pull/1379#discussion_r2264619061 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 779f406943b..ca5fa787153 100644 --- a/README.md +++ b/README.md @@ -234,14 +234,14 @@ A. [ Disclaimer: Here, how to make the completion code visible to Example for `Makefile.am`: ```makefile - bashcompdir = $(datarootdir)/bash-completion/completions + bashcompdir = $(datadir)/bash-completion/completions dist_bashcomp_DATA = your-completion-file ``` Example for `CMakeLists.txt`: ```cmake - install(FILES your-completion-file DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/bash-completion/completions") + install(FILES your-completion-file DESTINATION "${CMAKE_INSTALL_DATADIR}/bash-completion/completions") ``` **Q. When completing on a symlink to a directory, bash does not append From b72842c96f0f7ed6921c2b5e26fda989f593f405 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 10 Aug 2025 10:40:42 +0300 Subject: [PATCH 2/3] docs(README): include GNUInstallDirs in cmake non-pkgconfig tip https://github.com/scop/bash-completion/pull/1379#discussion_r2264619061 --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ca5fa787153..42d1a03c8b2 100644 --- a/README.md +++ b/README.md @@ -241,6 +241,7 @@ A. [ Disclaimer: Here, how to make the completion code visible to Example for `CMakeLists.txt`: ```cmake + include(GNUInstallDirs) install(FILES your-completion-file DESTINATION "${CMAKE_INSTALL_DATADIR}/bash-completion/completions") ``` From f34c62d5855fda7f0df51d03371baf4b12e6702e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Sun, 10 Aug 2025 10:41:12 +0300 Subject: [PATCH 3/3] docs(README): include GNUInstallDirs in cmake tip only when needed --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 42d1a03c8b2..63c15c5f78d 100644 --- a/README.md +++ b/README.md @@ -207,12 +207,12 @@ A. [ Disclaimer: Here, how to make the completion code visible to `bash-completion-config-version.cmake` files. Example usage: ```cmake - include(GNUInstallDirs) find_package(bash-completion) if(BASH_COMPLETION_FOUND) message(STATUS "Using bash completion dir ${BASH_COMPLETION_COMPLETIONSDIR}") else() + include(GNUInstallDirs) set (BASH_COMPLETION_COMPLETIONSDIR "${CMAKE_INSTALL_DATADIR}/bash-completion/completions") message (STATUS "Using fallback bash completion dir ${BASH_COMPLETION_COMPLETIONSDIR}")