]> git.eshelyaron.com Git - emacs.git/commitdiff
Make pcomplete/{rsh,rlogin} into alias for pcomplete/ssh
authorStefan Kangas <stefan@marxist.se>
Tue, 12 Jul 2022 14:32:07 +0000 (16:32 +0200)
committerStefan Kangas <stefan@marxist.se>
Tue, 12 Jul 2022 14:38:37 +0000 (16:38 +0200)
* lisp/pcmpl-unix.el (pcomplete/rlogin, pcomplete/rsh): Make into
aliases for 'pcomplete/ssh', as "rsh" and "rlogin" is more often than
not aliases for "ssh" on modern machines.

lisp/pcmpl-unix.el

index 0074722be78d78b8bf335571452243c9ac25100e..8774f091c837141996cef65fc823ea7fdc1dabbb 100644 (file)
@@ -197,6 +197,10 @@ Uses both `pcmpl-ssh-config-file' and `pcmpl-ssh-known-hosts-file'."
   (pcomplete-opt "1246AaCfgKkMNnqsTtVvXxYbcDeFiLlmOopRSw")
   (pcomplete-here (pcmpl-ssh-hosts)))
 
+;;;###autoload
+(defalias 'pcomplete/rsh    #'pcomplete/ssh)
+(defalias 'pcomplete/rlogin #'pcomplete/ssh)
+
 ;;;###autoload
 (defun pcomplete/scp ()
   "Completion rules for the `scp' command.
@@ -229,22 +233,12 @@ Includes files as well as host names followed by a colon."
 (defalias 'pcomplete/ftp    'pcmpl-unix-complete-hostname)
 (defalias 'pcomplete/ncftp  'pcmpl-unix-complete-hostname)
 (defalias 'pcomplete/ping   'pcmpl-unix-complete-hostname)
-(defalias 'pcomplete/rlogin 'pcmpl-unix-complete-hostname)
 
 ;;;###autoload
 (defun pcomplete/telnet ()
   (pcomplete-opt "xl(pcmpl-unix-user-names)")
   (pcmpl-unix-complete-hostname))
 
-;;;###autoload
-(defun pcomplete/rsh ()
-  "Complete `rsh', which, after the user and hostname, is like xargs."
-  (pcomplete-opt "l(pcmpl-unix-user-names)")
-  (pcmpl-unix-complete-hostname)
-  (pcomplete-here (funcall pcomplete-command-completion-function))
-  (funcall (or (pcomplete-find-completion-function (pcomplete-arg 1))
-               pcomplete-default-completion-function)))
-
 (provide 'pcmpl-unix)
 
 ;;; pcmpl-unix.el ends here