Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><code>gud-mode</code> retrieves the list of possible completitions by calling <em>gdb</em>'s <code>complete</code> command. In your example, the returned list would contain the following (assuming that there's only one directory in your file system that starts with "/mn"):</p> <pre><code>(run /mnt) </code></pre> <p>The first part of each entry in the returned list is cut off, so that the remaining complete-list is</p> <pre><code>(/mnt) </code></pre> <p>As you can see, this entry returned by <em>gdb's</em> <code>complete</code> command already lacks the trailing slash. Your only hope to fix this would be to either patch <em>gdb</em>'s <code>complete</code> command, or to patch Emacs' <code>gud-mode</code>, by somehow detecting that the completed word is a directory and then appending a slash (and suppressing the auto-insertion of the space character).</p> <p>But of course, you could simply bind the <kbd>TAB</kbd> key to a different completion function, potentially one that falls back on the default <code>gud-gdb-complete-command</code>, but perhaps does a different kind of completion when called for.</p> <p>For this, try putting the following in your .emacs file:</p> <pre class="lang-lisp prettyprint-override"><code>(defun my-gud-gdb-setup () (define-key (current-local-map) "\t" 'my-gud-gdb-complete-command)) (defun my-gud-gdb-complete-command (&amp;optional COMMAND PREDICATE FLAGS) (interactive) (unless (comint-dynamic-complete-filename) (gud-gdb-complete-command COMMAND PREDICATE FLAGS))) (add-hook 'gdb-mode-hook 'my-gud-gdb-setup) </code></pre> <p>This code binds a new function to the <kbd>TAB</kbd> key which first tries to expand the current word as a file, and only if that fails calls the default <code>gud-gdb-complete-command</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload