diff options
| author | Alex Kost <alezost@gmail.com> | 2015-06-06 22:19:51 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2015-06-08 11:46:05 +0300 |
| commit | 00a8dae2a6e74a0d7dd8a0b82c3dc08d3daf2a31 (patch) | |
| tree | 52f2970febcc684a157c723a1ff1024d5ba4499b /doc | |
| parent | 132e74fec99eaf0febb62269ca38bacebeaa0882 (diff) | |
emacs: Add shell completions for "guix" command.
Suggested by Ludovic Courtès <ludo@gnu.org>.
* emacs/guix-pcomplete.el: New file.
* emacs.am (ELFILES): Add it.
* doc/emacs.texi (Emacs Completions): New node.
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/emacs.texi | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/emacs.texi b/doc/emacs.texi index 6c1b255af08..00cd5c1396f 100644 --- a/doc/emacs.texi +++ b/doc/emacs.texi | |||
| @@ -19,6 +19,7 @@ guix package}). Specifically, ``guix.el'' makes it easy to: | |||
| 19 | * Usage: Emacs Usage. Using the interface. | 19 | * Usage: Emacs Usage. Using the interface. |
| 20 | * Configuration: Emacs Configuration. Configuring the interface. | 20 | * Configuration: Emacs Configuration. Configuring the interface. |
| 21 | * Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. | 21 | * Prettify Mode: Emacs Prettify. Abbreviating @file{/gnu/store/@dots{}} file names. |
| 22 | * Completions: Emacs Completions. Completing @command{guix} shell command. | ||
| 22 | @end menu | 23 | @end menu |
| 23 | 24 | ||
| 24 | @node Emacs Initial Setup | 25 | @node Emacs Initial Setup |
| @@ -489,3 +490,34 @@ mode hooks (@pxref{Hooks,,, emacs, The GNU Emacs Manual}), for example: | |||
| 489 | (add-hook 'shell-mode-hook 'guix-prettify-mode) | 490 | (add-hook 'shell-mode-hook 'guix-prettify-mode) |
| 490 | (add-hook 'dired-mode-hook 'guix-prettify-mode) | 491 | (add-hook 'dired-mode-hook 'guix-prettify-mode) |
| 491 | @end example | 492 | @end example |
| 493 | |||
| 494 | |||
| 495 | @node Emacs Completions | ||
| 496 | @subsection Shell Completions | ||
| 497 | |||
| 498 | Another feature that becomes available after configuring Emacs interface | ||
| 499 | (@pxref{Emacs Initial Setup}) is completing of @command{guix} | ||
| 500 | subcommands, options, packages and other things in @code{shell} | ||
| 501 | (@pxref{Interactive Shell,,, emacs, The GNU Emacs Manual}) and | ||
| 502 | @code{eshell} (@pxref{Top,,, eshell, Eshell: The Emacs Shell}). | ||
| 503 | |||
| 504 | It works the same way as other completions do. Just press @key{TAB} | ||
| 505 | when your intuition tells you. | ||
| 506 | |||
| 507 | And here are some examples, where pressing @key{TAB} may complete | ||
| 508 | something: | ||
| 509 | |||
| 510 | @itemize @w{} | ||
| 511 | |||
| 512 | @item @code{guix pa}@key{TAB} | ||
| 513 | @item @code{guix package -}@key{TAB} | ||
| 514 | @item @code{guix package --}@key{TAB} | ||
| 515 | @item @code{guix package -i gei}@key{TAB} | ||
| 516 | @item @code{guix build -L/tm}@key{TAB} | ||
| 517 | @item @code{guix build --sy}@key{TAB} | ||
| 518 | @item @code{guix build --system=i}@key{TAB} | ||
| 519 | @item @code{guix system rec}@key{TAB} | ||
| 520 | @item @code{guix lint --checkers=sy}@key{TAB} | ||
| 521 | @item @code{guix lint --checkers=synopsis,des}@key{TAB} | ||
| 522 | |||
| 523 | @end itemize | ||
