unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#9134: don't force mystery on user trying to find out what is completing after the word "ssh" in *shell*
@ 2011-07-20 23:49 jidanni
  2019-10-14  1:48 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 9+ messages in thread
From: jidanni @ 2011-07-20 23:49 UTC (permalink / raw)
  To: 9134

When we hit TAB in *shell* after the word "ssh",

* there are no messages about where in the world it is getting its
  completions. Unlike dabbrev-expand.

* C-h k TAB reveals nothing good about what is going on.

(rzgrep "ssh" "*.gz" "/usr/share/emacs/24.0.50/lisp/" nil "find . <X>
-type f <F> -exec zgrep <C> -nH -e <R> {} +") reveals

./net/tramp-sh.el.gz:423:    (tramp-parse-sconfig     "~/.ssh/config")

but C-h e shows that wasn't loaded.

Same with

./pcmpl-unix.el.gz:42:This allows one method of completion of SSH host names, the other

TRY IT YOURSELF:

$ emacs -Q -f shell
$ ssh C-h TAB
to try to find out where in the world it is getting its completions.

It won't tell you but I found it is in .ssh/config at least for me.
So there should be instructions RIGHT THERE at C-h k TAB
saying how to alter/turn off this.
E.G. if one wants to add a host, how is one supposed to put it into the
comments in that file, or .emacs.

>>>>> "SM" == Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> Recently in M-x shell,

SM> I guess "recently" means "using Emacs Bzr trunk".

$ apt-cache policy $@
emacs-snapshot:
  Installed: 1:20110705-1

>> after
>> $ ssh
>> completion becomes different.

SM> Right, it's done according to pcomplete/ssh.

Well all the user knows is he hits C-h k TAB and sees no obvious clue.

>> Either tell me a way to turn this bonus feature off.

SM> I think that (defun pcomplete/ssh () nil) should do the trick.

>> Or tell me a way to add my favorite hosts to a list that it is trying to
>> complete.

SM> Look at the source code of pcomplete/ssh to see how that list is built.

Gobbledygook to we the average user.

SM> Basically, adding hosts in your .ssh/config or .ssh/known_hosts should
SM> do the trick.

OK, by trial and error I found putting "empty entries" there in .ssh/config

Host jidanni.org #for emacs -f shell completion

worked. However the user hitting C-h k TAB won't figure that out and
will need to write in for help.





^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-10-14 14:37 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-20 23:49 bug#9134: don't force mystery on user trying to find out what is completing after the word "ssh" in *shell* jidanni
2019-10-14  1:48 ` Lars Ingebrigtsen
2019-10-14  3:32   ` Phil Sainty
2019-10-14  4:46     ` Drew Adams
2019-10-14 10:49       ` Phil Sainty
2019-10-14 12:26         ` Stefan Monnier
2019-10-14 14:37         ` Drew Adams
2019-10-14  4:50     ` Lars Ingebrigtsen
2019-10-14  5:08       ` Lars Ingebrigtsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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).