From: pareto optimal via Users list for the GNU Emacs text editor <help-gnu-emacs@gnu.org>
To: help-gnu-emacs@gnu.org
Subject: eshell sees `.#` as a directory as part of `nix build .#nixosConfigurations.my-pc`
Date: Sun, 20 Nov 2022 08:33:08 +0100 (CET) [thread overview]
Message-ID: <572890855.458115.1668929588145@orville.co-bxl> (raw)
Hi!
In xterm or vterm in emacs I get completion for the string `nix build .#` that looks like this:
```
$ nix build .#
.#deploy .#lib .#pkgs
.#devShell .#nixosConfigurations .#repl
.#gdb-frontend .#overlays .#waveform
.#homeConfigurations .#packages
```
In eshell however I get completions like this:
```
Click on a completion to select it.
In this buffer, type RET to select the completion near point.
Possible completions are:
../
./
```
I'd like the functionality to be the same in eshell.
I knew that `completion-at-point` was being used here and therefore it semed `copmletion-at-point-functions` would point me in the right direction to start studying in order to not treat `.#` as a filename in `nix build .#` and eventually get the same completions as xterm and vterm have.
So I looked at the value of completion-at-point-functions:
```
completion-at-point-functions is a variable defined in ‘minibuffer.el’.
Its value is (pcomplete-completions-at-point t)
Local in buffer *eshell*; global value is
(tags-completion-at-point-function)
```
Alright, So it's a pcomplete thing. I learned that pcomplete uses dynamic dispatch to find all handlers for completion from:
https://www.masteringemacs.org/article/pcomplete-context-sensitive-completion-emacs
So then I tried undefining `pcomplete/cd` which I thought was responsible with:
```
(fmakunbound 'pcomplete/cd)
```
However... even after starting a new eshelll... the behavior I didn't want was still there somehow.
Then I tried the sledgehammer option (or attempted it): remove all pcomplete handlers:
#+begin_src emacs-lisp :eval query
(fmakunbound 'pcomplete/ack)
(fmakunbound 'pcomplete/ack-grep)
(fmakunbound 'pcomplete/ag)
(fmakunbound 'pcomplete/bcc)
(fmakunbound 'pcomplete/bcc32)
(fmakunbound 'pcomplete/bzip2)
(fmakunbound 'pcomplete/chgrp)
(fmakunbound 'pcomplete/chown)
(fmakunbound 'pcomplete/cvs)
(fmakunbound 'pcomplete/eshell-mode/alias)
(fmakunbound 'pcomplete/eshell-mode/eshell-debug)
(fmakunbound 'pcomplete/eshell-mode/export)
(fmakunbound 'pcomplete/eshell-mode/setq)
(fmakunbound 'pcomplete/eshell-mode/unset)
(fmakunbound 'pcomplete/find)
(fmakunbound 'pcomplete/ftp)
(fmakunbound 'pcomplete/gdb)
(fmakunbound 'pcomplete/gzip)
(fmakunbound 'pcomplete/kill)
(fmakunbound 'pcomplete/make)
(fmakunbound 'pcomplete/mount)
(fmakunbound 'pcomplete/ncftp)
(fmakunbound 'pcomplete/ping)
(fmakunbound 'pcomplete/pushd)
(fmakunbound 'pcomplete/rlogin)
(fmakunbound 'pcomplete/rm)
(fmakunbound 'pcomplete/rmdir)
(fmakunbound 'pcomplete/rpm)
(fmakunbound 'pcomplete/rsh)
(fmakunbound 'pcomplete/scp)
(fmakunbound 'pcomplete/ssh)
(fmakunbound 'pcomplete/sudo)
(fmakunbound 'pcomplete/tar)
(fmakunbound 'pcomplete/telnet)
(fmakunbound 'pcomplete/time)
(fmakunbound 'pcomplete/tlmgr)
(fmakunbound 'pcomplete/umount)
(fmakunbound 'pcomplete/which)
(fmakunbound 'pcomplete/xargs)
#+end_src
`C-h f pcomplete/<no match>` now shows up in my `emacs -Q` instance and I assumed this means pcomplete has no way to complete.
However I still get the directory completions... and I'm not quite sure how to proceed or what information I'm missing to solve my current problem.
Can anyone help?
reply other threads:[~2022-11-20 7:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=572890855.458115.1668929588145@orville.co-bxl \
--to=help-gnu-emacs@gnu.org \
--cc=pareto.optimal@mailfence.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).