[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/bash-completion 51c7770758 284/313: Fix and update README.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/bash-completion 51c7770758 284/313: Fix and update README.md |
Date: |
Sat, 3 Dec 2022 10:59:38 -0500 (EST) |
branch: elpa/bash-completion
commit 51c77707586409c542f100d84799abf14118bcff
Author: Stephane Zermatten <szermatt@gmx.net>
Commit: GitHub <noreply@github.com>
Fix and update README.md
This change fixes some incorrect quotes, using emacs-style `' instead of
makdown-style ``.
It rewords the instructions for using
bash-completion-dynamic-complete-nocomint
---
README.md | 29 +++++++++++++++++------------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git a/README.md b/README.md
index 69081196c1..5793e596a2 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@ Bash completion for Emacs:
- works on remote shells, through TRAMP.
A simpler and more complete alternative to bash-completion.el is to
-run a bash shell in a buffer in term mode(M-x `ansi-term').
+run a bash shell in a buffer in term mode (`M-x ansi-term`).
Unfortunately, many Emacs editing features are not available when
running in term mode. Also, term mode is not available in
shell-command prompts.
@@ -49,7 +49,7 @@ or simpler, but forces you to load bash-completion at startup:
(bash-completion-setup)
```
-After that reload your .emacs (M-x `eval-buffer') or restart.
+After that reload your .emacs (`M-x eval-buffer`) or restart.
When called from a bash shell buffer,
`bash-completion-dynamic-complete` communicates with the current shell
@@ -65,20 +65,25 @@ from normal shell processes.
### Completion at point
Additionally, you can enable bash completion in any buffer that contains bash
-commands. To do that, call `bash-completion-dynamic-complete-nocomint` from a
-function added to `completion-at-point-functions`.
+commands. To do that, call
+```elisp
+(bash-completion-dynamic-complete-nocomint COMP-START COMP-POS DYNAMIC-TABLE)
+```
+from a function added to `completion-at-point-functions`.
-The tricky part is figuring out where the bash command starts, because that
-depends on the mode of the calling buffer and might, in some cases, span
+The trickiest part is setting COMP-START to where the bash command starts;
+It depends on the mode of the calling buffer and might, in some cases, span
multiple lines.
-In any cases, when calling from `completion-at-point', make sure to pass a
-non-nil value to DYNAMIC-TABLE argument. This isn't just an optimization:
-returning a function instead of a list tells Emacs it should avoids
-post-filtering the results and possibly discarding useful completion from
-bash.
+COMP-POS is usually the current position of the cursor.
+
+When calling from `completion-at-point`, make sure to pass a non-nil value
+to the DYNAMIC-TABLE argument so it returns a function instead of a list
+of strings. This isn't just an optimization: returning a function instead
+of a list tells Emacs it should avoids post-filtering the results and
+possibly discarding useful completion from bash.
-Here's, for example, a function to to do bash completion from an
+For example, here's a function to to do bash completion from an
eshell buffer. To try it out, add the function below to your init file
and bind `bash-completion-from-eshell` to a custom shortcut.
- [nongnu] elpa/bash-completion 96d2cef799 259/313: Prepare for a 3.0 release., (continued)
- [nongnu] elpa/bash-completion 96d2cef799 259/313: Prepare for a 3.0 release., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4aafffe76a 260/313: Create CONTRIBUTING.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 2b9eba14fa 261/313: Update README.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 79ce50bec9 262/313: Update README.md title, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 5e623ac270 275/313: Revert "Add test cases for TRAMP shell.", ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 702859f319 278/313: Cleanup strings containing bash commands., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 19d4fec42f 280/313: Use && instead of ; after cd, so completion fails if cd fails., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion c584d4936b 281/313: Explicitly ignore error from the history command., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion de033933bd 282/313: Chain function definitions with && during setup., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e24a596631 283/313: Make integration tests stabler., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 51c7770758 284/313: Fix and update README.md,
ELPA Syncer <=
- [nongnu] elpa/bash-completion c6decb1d6c 285/313: Avoid escaping all non-ASCII characters., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 4c216c4eea 286/313: Add an integration test to cover multiple completion results., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 8f877dc2ce 287/313: Let bash compute COMP_POINT, always at the end of COMP_LINE., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 377969faa7 288/313: Fix typos in README.md, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 72e9fce93d 291/313: Properly apply filter passed to the dynamic completion function., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 35d38fd3dc 295/313: Workaround for output containing \r\n instead of \n., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion 666244383e 296/313: Workaround for command-line being echoed., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abb72c36b8 297/313: Merge branch 'master' of github.com:szermatt/emacs-bash-completion, ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion e35943f37e 299/313: Fix backward-compatibility issue on 24.3: avoid using alist-get., ELPA Syncer, 2022/12/03
- [nongnu] elpa/bash-completion abbe3bc268 301/313: Cleanup implementation of bash-completion-debug., ELPA Syncer, 2022/12/03