From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: pareto optimal via Users list for the GNU Emacs text editor Newsgroups: gmane.emacs.help Subject: eshell sees `.#` as a directory as part of `nix build .#nixosConfigurations.my-pc` Date: Sun, 20 Nov 2022 08:33:08 +0100 (CET) Message-ID: <572890855.458115.1668929588145@orville.co-bxl> Reply-To: pareto optimal Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="27115"; mail-complaints-to="usenet@ciao.gmane.io" To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 20 21:10:01 2022 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1owqdd-0006qU-Dq for geh-help-gnu-emacs@m.gmane-mx.org; Sun, 20 Nov 2022 21:10:01 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1owqdS-0004hv-TG; Sun, 20 Nov 2022 15:09:54 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owepJ-0004Zq-41 for help-gnu-emacs@gnu.org; Sun, 20 Nov 2022 02:33:17 -0500 Original-Received: from wilbur.contactoffice.com ([212.3.242.68]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1owepG-00018L-AI for help-gnu-emacs@gnu.org; Sun, 20 Nov 2022 02:33:16 -0500 Original-Received: from orville.co-bxl (orville.co-bxl [10.2.0.35]) by wilbur.contactoffice.com (Postfix) with ESMTP id 5C9AF1678 for ; Sun, 20 Nov 2022 08:33:10 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1668929590; s=20210208-e7xh; d=mailfence.com; i=pareto.optimal@mailfence.com; h=Date:Message-ID:MIME-Version:Content-Type:Subject:From:To; l=8727; bh=H3yxktpYg2aXJdnXKJFgOazbxcCQWwskx6KyPauDXMw=; b=PS3mzk0OP2pVw4Q79bn9xilUt3kJ9KIP3Kf1bHLwJlDYbcbsD4vRt85OPyAEEmpc YvHwHP7eyE7aMwtFTzb0tupPIAE7LAMD2HCzUrfCKvqkfSDY2p3ip9MXhHYx8BX79VI BEk6P/7kFqAmnUmYkVA2GRn4x3LV1famXCsIIslPhTuAcSy1fgf/S8fe3WXHCh7dTR3 tU4KBB/HXOfWut7h4x48cJxvtCWYtKvWjqSSaa0Jn5u1Q7O3YEBy9hd6LpY6331EkaV XndxRFDAs7hyapbhBJG7F3bAw8MmI+jrLpl9mw5ekw2Zs+M5AXl7M5qfotMe/T1MCjT VlFbl0QITQ== X-Mailer: ContactOffice Mail X-ContactOffice-Account: com:311504211 Received-SPF: pass client-ip=212.3.242.68; envelope-from=pareto.optimal@mailfence.com; helo=wilbur.contactoffice.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 20 Nov 2022 15:09:34 -0500 Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:141068 Archived-At: Hi! In xterm or vterm in emacs I get completion for the string `nix build .#` t= hat looks like this: ``` $ nix build .# .#deploy=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.#lib=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 .#pkgs .#devShell=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.#nixosConfigurat= ions=C2=A0 .#repl .#gdb-frontend=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.#overlays=C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0.#waveform .#homeConfigurations=C2=A0 =C2=A0.#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 seme= d `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 .#` a= nd 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 =E2=80=98minibuffer.= el=E2=80=99. Its value is (pcomplete-completions-at-point t) Local in buffer *eshell*; global value is=C2=A0 (tags-completion-at-point-function) ``` Alright, So it's a pcomplete thing. I learned that pcomplete uses dynamic d= ispatch to find all handlers for completion from: https://www.masteringemacs.org/article/pcomplete-context-sensitive-completi= on-emacs So then I tried undefining `pcomplete/cd` which I thought was responsible w= ith: ``` (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 pcomplet= e 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/` now shows up in my `emacs -Q` instance and I a= ssumed 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?