* eshell sees `.#` as a directory as part of `nix build .#nixosConfigurations.my-pc`
@ 2022-11-20 7:33 pareto optimal via Users list for the GNU Emacs text editor
0 siblings, 0 replies; only message in thread
From: pareto optimal via Users list for the GNU Emacs text editor @ 2022-11-20 7:33 UTC (permalink / raw)
To: help-gnu-emacs
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?
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-11-20 7:33 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-20 7:33 eshell sees `.#` as a directory as part of `nix build .#nixosConfigurations.my-pc` pareto optimal via Users list for the GNU Emacs text editor
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.