[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/ssh-deploy 592427e 121/173: Added support for launching
From: |
Stefan Monnier |
Subject: |
[elpa] externals/ssh-deploy 592427e 121/173: Added support for launching remote shell sessions |
Date: |
Sat, 20 Oct 2018 10:36:42 -0400 (EDT) |
branch: externals/ssh-deploy
commit 592427e307d0d4c124c506f82e2d07ede1329d8e
Author: Christian Johansson <address@hidden>
Commit: Christian Johansson <address@hidden>
Added support for launching remote shell sessions
---
README.md | 2 +-
ssh-deploy.el | 57 ++++++++++++++++++++++++++++++++++++++++++++-------------
2 files changed, 45 insertions(+), 14 deletions(-)
diff --git a/README.md b/README.md
index 4e05f30..6439fad 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@ The `ssh-deploy` plug-in for Emacs makes it possible to
effortlessly deploy loca
* Control whether uploads of files should be automatic on save
* Manual downloads and uploads of directories and files
* Automatic and manual detection of remote changes of files using local
revisions
-* Launch remote `eshell` terminals in base or relative directory
+* Launch remote `eshell` and `shell` terminals in base or relative directory
* Launch remote `dired` browsing in base or relative directory
* Launch difference sessions for files using `ediff`
* Launch difference sessions for directories using a custom implementation of
recursive directory differences over TRAMP based on `ediff`
diff --git a/ssh-deploy.el b/ssh-deploy.el
index b0642de..7769b17 100644
--- a/ssh-deploy.el
+++ b/ssh-deploy.el
@@ -3,8 +3,8 @@
;; Author: Christian Johansson <github.com/cjohansson>
;; Maintainer: Christian Johansson <github.com/cjohansson>
;; Created: 5 Jul 2016
-;; Modified: 2 Mar 2018
-;; Version: 1.82
+;; Modified: 24 Mar 2018
+;; Version: 1.83
;; Keywords: tools, convenience
;; URL: https://github.com/cjohansson/emacs-ssh-deploy
@@ -32,7 +32,7 @@
;;; Commentary:
;; ssh-deploy enables automatic deploys on explicit-save actions, manual
uploads, renaming,
-;; deleting, downloads, file and directory differences, launching remote
terminals,
+;; deleting, downloads, file and directory differences, launching remote
terminals (eshell, shell),
;; detection of remote changes, remote directory browsing, remote SQL database
sessions via TRAMP.
;;
;; For asynchrous operations it uses package async.el.
@@ -797,20 +797,31 @@
(let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
(root-local (or root-local ssh-deploy-root-local))
(root-remote (or root-remote ssh-deploy-root-remote)))
- (if (and (ssh-deploy--file-is-in-path path-local root-local)
+ (when (and (ssh-deploy--file-is-in-path path-local root-local)
(ssh-deploy--file-is-included path-local exclude-list))
(let ((path-remote (concat root-remote (ssh-deploy--get-relative-path
root-local path-local))))
(let ((old-directory default-directory))
(require 'eshell)
- (if (and (fboundp 'eshell-kill-input)
- (fboundp 'eshell-send-input))
- (progn
- (message "Opening eshell on '%s'.." path-remote)
- (let ((default-directory path-remote))
- (defvar eshell-buffer-name)
- (setq eshell-buffer-name path-remote)
- (eshell)))
- (message "Missing required eshell functions")))))))
+ (message "Opening eshell on '%s'.." path-remote)
+ (let ((default-directory path-remote))
+ (defvar eshell-buffer-name)
+ (setq eshell-buffer-name path-remote)
+ (eshell)))))))
+
+;;;### autoload
+(defun ssh-deploy-remote-terminal-shell (path-local &optional root-local
root-remote exclude-list)
+ "Browse PATH-LOCAL inside ROOT-LOCAL on ROOT-REMOTE in `eshell-mode' if not
in EXCLUDE-LIST."
+ (let ((exclude-list (or exclude-list ssh-deploy-exclude-list))
+ (root-local (or root-local ssh-deploy-root-local))
+ (root-remote (or root-remote ssh-deploy-root-remote)))
+ (when (and (ssh-deploy--file-is-in-path path-local root-local)
+ (ssh-deploy--file-is-included path-local exclude-list))
+ (let ((path-remote (concat root-remote (ssh-deploy--get-relative-path
root-local path-local))))
+ (let ((old-directory default-directory))
+ (require 'shell)
+ (message "Opening eshell on '%s'.." path-remote)
+ (let ((default-directory path-remote))
+ (shell path-remote)))))))
;;;### autoload
(defun ssh-deploy-store-revision (path &optional root)
@@ -1042,6 +1053,26 @@
(ssh-deploy-remote-terminal-eshell root-local root-local
ssh-deploy-root-remote ssh-deploy-exclude-list))))
;;;### autoload
+(defun ssh-deploy-remote-terminal-shell-handler ()
+ "Open current relative path on remote host in `eshell' but only if it's
configured for deployment."
+ (interactive)
+ (if (and (ssh-deploy--is-not-empty-string ssh-deploy-root-local)
+ (ssh-deploy--is-not-empty-string ssh-deploy-root-remote)
+ (ssh-deploy--is-not-empty-string default-directory))
+ (let ((path-local (file-truename default-directory))
+ (root-local (file-truename ssh-deploy-root-local)))
+ (ssh-deploy-remote-terminal-shell path-local root-local
ssh-deploy-root-remote ssh-deploy-exclude-list))))
+
+;;;### autoload
+(defun ssh-deploy-remote-terminal-shell-base-handler ()
+ "Open base path on remote host in `eshell' but only if it's configured for
deployment."
+ (interactive)
+ (if (and (ssh-deploy--is-not-empty-string ssh-deploy-root-local)
+ (ssh-deploy--is-not-empty-string ssh-deploy-root-remote))
+ (let ((root-local (file-truename ssh-deploy-root-local)))
+ (ssh-deploy-remote-terminal-shell root-local root-local
ssh-deploy-root-remote ssh-deploy-exclude-list))))
+
+;;;### autoload
(defun ssh-deploy-browse-remote-handler ()
"Open current relative path on remote host in `dired-mode' if it is
configured for deployment."
(interactive)
- [elpa] externals/ssh-deploy cf4f5e7 133/173: Added delete shortcut to menu-bar as well, (continued)
- [elpa] externals/ssh-deploy cf4f5e7 133/173: Added delete shortcut to menu-bar as well, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 36b81ff 111/173: Fixed bug where async upload to new remote directory was not working, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c58f524 141/173: Using (with-current-buffer) instead of (switch-to-buffer), Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 42d4d7a 150/173: Merge branch 'master' of https://github.com/cjohansson/emacs-ssh-deploy, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b17f543 151/173: line status does not get stuck on asynchronously uploads/downloads, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c813bbb 154/173: Improved syntax and comments for detecting remote changes, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 1d3d534 161/173: Added verbose flag to enable silencing of non-error messages, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 0e3e55e 168/173: Merge branch 'master' of https://github.com/cjohansson/emacs-ssh-deploy, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy aef539b 115/173: Create potential missing local directory when downloading file, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy c2a2be4 119/173: Naming remote SQL buffers to enable having multiple open simultaneously, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 592427e 121/173: Added support for launching remote shell sessions,
Stefan Monnier <=
- [elpa] externals/ssh-deploy c07b006 114/173: Replaced (file-regular-p) with (not (file-directory-p)), Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 96276c8 135/173: Added forced upload to menu-bar, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 715325d 126/173: Improved wording of directory difference calculation, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b879998 116/173: Added support for remote SQL sessions, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy fc9bdbc 142/173: Asynchronously downloaded buffers are now automatically reverted, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 519a639 147/173: Fixed issue were buffer was marked as modified after a rename, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 2f281c3 158/173: Fixed bug in (when (not to (unless conversion, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy a81c3f1 166/173: Fixed README syntax, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy b560147 164/173: Rename run script menu item, Stefan Monnier, 2018/10/20
- [elpa] externals/ssh-deploy 104a384 170/173: Fixed lambda function predicate function, Stefan Monnier, 2018/10/20