Use native apt-cyg bash completion.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Thu, 03 Jan 2019 13:56:48 +0200
changeset 921 51aac2ea3cf4
parent 920 c03d7e5281ac
child 922 e2c60fd8f61b
Use native apt-cyg bash completion.
.bash_completion.d.attic/apt-cyg
.bash_completion.d/apt-cyg
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.bash_completion.d.attic/apt-cyg	Thu Jan 03 13:56:48 2019 +0200
@@ -0,0 +1,27 @@
+# -*- mode: sh; sh-shell-file: bash -*-
+
+_apt_cyg()
+{
+  local _cmds="install remove update download show depends rdepends list listall category listfiles search searchall mirror cache"
+  local cur
+  cur=${COMP_WORDS[COMP_CWORD]}
+  if [[ $COMP_CWORD = 1 ]]; then
+      COMPREPLY=( $(compgen -W '$_cmds' -- "$cur") )
+      return 0
+  fi
+  local _cmd=${COMP_WORDS[1]}
+  case "$_cmd" in
+    install|remove|download|show|depends|rdepends|listfiles)
+      COMPREPLY=( $(apt-cyg listall ^"$cur") )
+      return 0 ;;
+    update|list|listall|category|search|searchall|mirror)
+      COMPREPLY=( )
+      return 0 ;;
+    cache)
+      COMPREPLY=( $(compgen -d -- "$cur") )
+      return 0 ;;
+    *)
+      return 1 ;;
+  esac
+} &&
+    complete -F _apt_cyg apt-cyg
--- a/.bash_completion.d/apt-cyg	Thu Jan 03 00:16:24 2019 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-# -*- mode: sh; sh-shell-file: bash -*-
-
-_apt_cyg()
-{
-  local _cmds="install remove update download show depends rdepends list listall category listfiles search searchall mirror cache"
-  local cur
-  cur=${COMP_WORDS[COMP_CWORD]}
-  if [[ $COMP_CWORD = 1 ]]; then
-      COMPREPLY=( $(compgen -W '$_cmds' -- "$cur") )
-      return 0
-  fi
-  local _cmd=${COMP_WORDS[1]}
-  case "$_cmd" in
-    install|remove|download|show|depends|rdepends|listfiles)
-      COMPREPLY=( $(apt-cyg listall ^"$cur") )
-      return 0 ;;
-    update|list|listall|category|search|searchall|mirror)
-      COMPREPLY=( )
-      return 0 ;;
-    cache)
-      COMPREPLY=( $(compgen -d -- "$cur") )
-      return 0 ;;
-    *)
-      return 1 ;;
-  esac
-} &&
-    complete -F _apt_cyg apt-cyg