[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 319886faa9 138/313: Add / after directory
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 319886faa9 138/313: Add / after directory names - even if they contain spaces or special |
Date: |
Sat, 3 Dec 2022 10:59:24 -0500 (EST) |
branch: elpa/bash-completion
commit 319886faa901d4ca97aa58e471e659340f453d16
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: Stephane Zermatten <szermatt@gmx.net>
Add / after directory names - even if they contain spaces or special
characters, escaped with \\.
When completing filenames with spaces, emacs bash completion escapes
spaces and other special characters with backslashes. So when
completing:
ls ~/Documents/My
to the directory "My Books", emacs bash completion completes it to:
ls ~/Documents/My\\ Book/
with this fix, the / is there. Without it, emacs bash completion would
look for a directory called "My\\ Book" - fail to find it and not add
the backslash.
---
bash-completion.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bash-completion.el b/bash-completion.el
index a58bf9486f..cf9ed50d6f 100644
--- a/bash-completion.el
+++ b/bash-completion.el
@@ -801,7 +801,10 @@ This function looks for a directory called STR relative to
the
buffer-local variable default-directory. If it exists, it returns
\(concat STR \"/\"). Otherwise it retruns STR."
(if (and (null (string-match bash-completion-known-suffixes-regexp str))
- (file-accessible-directory-p (expand-file-name str
default-directory)))
+ (file-accessible-directory-p
+ (expand-file-name
+ (replace-regexp-in-string "\\(\\\\\\)\\(.\\)" "\\2" str)
+ default-directory)))
(concat str "/")
str))
- [nongnu] elpa/bash-completion 33ed66e567 099/313: bash-completion-nospace option, (continued)
- [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, 2022/12/03
- [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 <=
- [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
- [nongnu] elpa/bash-completion 6ab1fe406b 148/313: Always quote the stub before passing it to compgen., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion a789093cd3 155/313: Run tests on older versions of Emacs., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5e05365dc8 153/313: Cleanup tests, split them into unit and integration tests., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 09c93ffbdb 165/313: Explicitly disable support for Emacs version older than 24.1., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 62c6567af6 158/313: Complete argument rename, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5eb85cf1fc 166/313: Remove obsolete functions bash-completion-dynamic-complete-0 and, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 9b94818f88 167/313: Remove support for pre-Emacs24.1 backward compatibility., ELPA Syncer, 2022/12/03