[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion bab4cf6e8d 109/313: Merge remote-tracking
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion bab4cf6e8d 109/313: Merge remote-tracking branch 'origin/master' into complete_D |
Date: |
Sat, 3 Dec 2022 10:59:21 -0500 (EST) |
branch: elpa/bash-completion
commit bab4cf6e8d4aa8579609f01382d31a632d7216b7
Merge: 3859be798a e77c841dac
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Merge remote-tracking branch 'origin/master' into complete_D
Conflicts:
bash-completion.el
---
README.md | 2 ++
bash-completion.el | 63 ++++++++++++++++++++++++++++--------------------------
2 files changed, 35 insertions(+), 30 deletions(-)
diff --git a/README.md b/README.md
index 21400290bd..f2e6081da4 100644
--- a/README.md
+++ b/README.md
@@ -107,6 +107,8 @@ This package is known to work on the following environment:
- GNU Emacs 22.1.1 (OSX 10.5)
- GNU Emacs 22.1.1 (Ubuntu 8.04)
- GNU Emacs 23.0.94.1 (Ubuntu 8.10)
+- GNU Emacs 24.1.1 (OSX 10.7)
+- GNU Emacs 24.1.1 (OSX 10.8)
and using the following bash versions:
diff --git a/bash-completion.el b/bash-completion.el
index 9747a61460..3894da3f5f 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -56,7 +56,7 @@
;; 'bash-completion-dynamic-complete)
;;
;; or simpler, but forces you to load this file at startup:
-;;
+;;
;; (require 'bash-completion)
;; (bash-completion-setup)
;;
@@ -132,11 +132,11 @@
;; 2009-11-25 Stephane Zermatten <szermatt@gmail.com>
;;
;; * bash-completion-require-process: set MAILCHECK to -1
-;; to disable mail check message.
+;; to disable mail check message.
;;
;; 2009-08-01 Stephane Zermatten <szermatt@gmail.com>
;;
-;; * bash-completion-generate-line: add missing compgen
+;; * bash-completion-generate-line: add missing compgen
;; option to complete commands (duh!).
;;
;; Current version:
@@ -206,6 +206,7 @@ to remove the extra space bash adds after a completion."
(defvar bash-completion-process nil
"Bash process object.")
+(defvar bash-completion-prefix "" "")
(defvar bash-completion-alist nil
"Maps from command name to the 'complete' arguments.
@@ -234,6 +235,32 @@ function returns status code 124, meaning that the
completion
should be retried. This should be a string that's unlikely
to be included into a completion output.")
+;;; ---------- Inline functions
+
+(defsubst bash-completion-tokenize-get-range (token)
+ "Return the TOKEN range as a cons: (start . end)."
+ (cdr (assq 'range token)))
+
+(defsubst bash-completion-tokenize-set-end (token)
+ "Set the end position of TOKEN to the cursor position."
+ (setcdr (bash-completion-tokenize-get-range token) (point)))
+
+(defsubst bash-completion-tokenize-append-str (token str)
+ "Append to TOKEN the string STR."
+ (let ((str-cons (assq 'str token)))
+ (setcdr str-cons (concat (cdr str-cons) str))))
+
+(defsubst bash-completion-tokenize-get-str (token)
+ "Return the TOKEN string."
+ (cdr (assq 'str token)))
+
+(defsubst bash-completion-tokenize-open-quote (tokens)
+ "Return the quote character that was still open in the last token.
+
+TOKENS is a list of token as returned by
+`bash-completion-tokenize'."
+ (cdr (assq 'quote (car (last tokens)))))
+
;;; ---------- Functions: completion
;;;###autoload
@@ -439,30 +466,6 @@ list of strings.
TOKENS should be in the format returned by `bash-completion-tokenize'."
(mapcar 'bash-completion-tokenize-get-str tokens))
-(defsubst bash-completion-tokenize-get-range (token)
- "Return the TOKEN range as a cons: (start . end)."
- (cdr (assq 'range token)))
-
-(defsubst bash-completion-tokenize-set-end (token)
- "Set the end position of TOKEN to the cursor position."
- (setcdr (bash-completion-tokenize-get-range token) (point)))
-
-(defsubst bash-completion-tokenize-append-str (token str)
- "Append to TOKEN the string STR."
- (let ((str-cons (assq 'str token)))
- (setcdr str-cons (concat (cdr str-cons) str))))
-
-(defsubst bash-completion-tokenize-get-str (token)
- "Return the TOKEN string."
- (cdr (assq 'str token)))
-
-(defsubst bash-completion-tokenize-open-quote (tokens)
- "Return the quote character that was still open in the last token.
-
-TOKENS is a list of token as returned by
-`bash-completion-tokenize'."
- (cdr (assq 'quote (car (last tokens)))))
-
(defun bash-completion-tokenize (start end)
"Tokenize the portion of the current buffer between START and END.
@@ -708,8 +711,8 @@ for directory name detection to work."
;; completion is a substring of prefix something's
;; gone wrong. Treat it as one (useless)
;; candidate.
- (setq prefix "")
- (setq rest str))
+ (setq prefix "")
+ str)
;; completion sometimes only applies to the last word, as
;; defined by COMP_WORDBREAKS. This detects and works around
;; this feature.
@@ -870,7 +873,7 @@ is set to t."
(process-send-string process (concat ". " startfile1 "\n")))
((file-exists-p startfile2)
(process-send-string process (concat ". " startfile2 "\n")))))
- (bash-completion-send "PS1='\t$?\v'" process
bash-completion-initial-timeout)
+ (bash-completion-send "PROMPT_COMMAND='';PS1='\t$?\v'" process
bash-completion-initial-timeout)
(bash-completion-send (concat "function __bash_complete_wrapper {"
" eval $__BASH_COMPLETE_WRAPPER;"
" n=$?; if [[ $n = 124 ]]; then"
- [nongnu] elpa/bash-completion 3ec615a4ef 077/313: added id, (continued)
- [nongnu] elpa/bash-completion 3ec615a4ef 077/313: added id, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f1d8d73b42 072/313: changed comment, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2d6ad3980a 062/313: fixes for emacs 22, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9583153e0b 068/313: Fixed issue with wordbreak character being the first character, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 7dec35f302 087/313: Set MAIL to the empty string in case shopt -u mailwarn is not, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8a246f40da 088/313: bash-completion-generate-line: add missing compgen option to, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 6fb6bf5588 081/313: Mention ghardy bash version, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 33ed66e567 099/313: bash-completion-nospace option, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion cf42ed1057 101/313: add compatibility information for emacs 24.1.1 with OSX 10.7 / 10.8, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f9903d4bd4 079/313: ran checkdoc again, re-ran integration tests, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion bab4cf6e8d 109/313: Merge remote-tracking branch 'origin/master' into complete_D,
ELPA Syncer <=
- [nongnu] elpa/bash-completion dce43a54c5 119/313: Update comment in bash-completion-test, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5209200f3b 120/313: Using cl-letf instead of flet., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9588a9c0dd 125/313: Updated README, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c5f2b2756f 129/313: Define sz-testutils as a global variable., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f085c41d8d 131/313: Add defcustom for bash-completion-args, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8ca917f428 133/313: Stop escaping = in completion. fixes #18, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 319886faa9 138/313: Add / after directory names - even if they contain spaces or special, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion f2ea2b65df 141/313: Detect directories when expanding commands and add a slash instead of a, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 44bc73449e 144/313: Fixes strange behavior when completing --., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion b4757884b0 145/313: Expand the tests to better cover wordbreak and command argument, ELPA Syncer, 2022/12/03