Command line auto-completion - AppImages
authorColin Clark <colin.clark@cclark.uk>
Tue, 2 Apr 2024 13:56:54 +0000 (14:56 +0100)
committerColin Clark <colin.clark@cclark.uk>
Tue, 2 Apr 2024 13:56:54 +0000 (14:56 +0100)
- Auto-completion does not work with AppImages. Document a work-around.
- Change the format of the completions file to be the same as similar
files.

README.md
auto-complete/geeqie

index a420725..6d37e30 100644 (file)
--- a/README.md
+++ b/README.md
@@ -137,6 +137,17 @@ There are also options to install desktop icons, menu items, and to revert to ea
 
 AppImages have a "portable mode" which is described [here](https://docs.appimage.org/user-guide/portable-mode.html).
 
+**Note:**
+
+Command line auto-completion does not work with AppImages. If you are using the AppImage `--extract` option, this is a work-around.
+
+Assuming you have extracted the AppImage to `$HOME/bin/Geeqie-latest-x86_64-AppImage/`, create a symbolic link as follows:
+
+```sh
+mkdir --parents $HOME/.local/share/bash-completion/completions/
+ln --symbolic $HOME/bin/Geeqie-latest-x86_64-AppImage/squashfs-root/usr/local/share/bash-completion/completions/geeqie $HOME/.local/share/bash-completion/completions/geeqie
+```
+
 ### Installation scripts
 
 Geeqie is stable and you may compile the latest version from sources.
index 4dd9b83..44b6a45 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/bash
+# bash completion for geeqie                              -*- shell-script -*-
 
 _geeqie()
 {
@@ -7,8 +7,6 @@ _geeqie()
 
     if [[ $cur == -* ]]
     then
-        # shellcheck disable=SC2207
-        # shellcheck disable=SC2016
         COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
         [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
         return