emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/bash-completion 2390d5cdf3 061/313: more commends and docu


From: ELPA Syncer
Subject: [nongnu] elpa/bash-completion 2390d5cdf3 061/313: more commends and documentation; still need a commentary section
Date: Sat, 3 Dec 2022 10:59:16 -0500 (EST)

branch: elpa/bash-completion
commit 2390d5cdf373f19460c90edf414df21daa70b546
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>

    more commends and documentation; still need a commentary section
---
 bash-completion.el | 38 ++++++++++++++++++++++++++++----------
 1 file changed, 28 insertions(+), 10 deletions(-)

diff --git a/bash-completion.el b/bash-completion.el
index 84ceb18e7f..140f288c85 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -2,13 +2,25 @@
 
 
 ;;; Commentary:
-;; 
-;;if [[ ( -z "$INSIDE_EMACS" || "$EMACS_BASH_COMPLETE" = "t" ) && -f 
/etc/bash_c;;ompletion ]]; then
-;;  echo -n "BASH completion..."
-;;  . /etc/bash_completion
-;;  echo "ON"
-;;fi
-
+;;
+;; TODO(szermatt)
+;;
+;; .bashrc:
+;; if [[ ( -z "$INSIDE_EMACS" || "$EMACS_BASH_COMPLETE" = "t" ) &&\
+;;      -f /etc/bash_completion ]]; then
+;;   . /etc/bash_completion
+;; fi
+;;
+;; .emacs:
+;; (autoload 'bash-completion-dynamic-complete \"bash-completion\"
+;;   \"BASH completion hook\")
+;; (add-hook 'shell-dynamic-complete-functions
+;;       'bash-completion-dynamic-complete)
+;; (add-hook 'shell-command-complete-functions
+;;       'bash-completion-dynamic-complete))
+;;
+;; Interactive command:
+;; 'bash-completion-reset`
 
 ;;; History:
 ;;
@@ -18,7 +30,7 @@
 ;;; Code:
 
 
-;;; ---------- Customization 
+;;; ---------- Customization
 (defgroup bash-completion nil
   "BASH configurable command-line completion "
   :group 'shell
@@ -60,7 +72,7 @@ which typically takes a long time."
   :type '(float)
   :group 'bash-completion)
 
-;;; ---------- Internal variables and constants 
+;;; ---------- Internal variables and constants
 
 (defvar bash-completion-process nil
   "Bash process object.")
@@ -99,7 +111,13 @@ This function is convenient, but it might not be the best 
way of enabling
 bash completion in your .emacs file because it forces you to load the module
 before it is needed. For an autoload version, add:
 
-TODO"
+(autoload 'bash-completion-dynamic-complete \"bash-completion\"
+  \"BASH completion hook\")
+(add-hook 'shell-dynamic-complete-functions
+         'bash-completion-dynamic-complete)
+(add-hook 'shell-command-complete-functions
+         'bash-completion-dynamic-complete))
+"
   (add-hook 'shell-dynamic-complete-functions
            'bash-completion-dynamic-complete)
   (add-hook 'shell-command-complete-functions



reply via email to

[Prev in Thread] Current Thread [Next in Thread]