about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDavid Morgan <djm_uk@protonmail.com>2022-12-02 06:55:24 +0000
committerDavid Morgan <djm_uk@protonmail.com>2022-12-02 06:55:24 +0000
commita5035cbb1dafa255afcd0896af4ee320f6ddf9b3 (patch)
treecf617d1568aad863839233839eb9210ea5a4a1d3
parent79cdd274338b0224b95cd9b09a36d50388b61d19 (diff)
downloaddotfiles-a5035cbb1dafa255afcd0896af4ee320f6ddf9b3.tar.gz
Fix tramp + zsh
-rw-r--r--.emacs.d/lisp/init-tramp.el1
-rw-r--r--nix-conf/home/includes/zsh.nix3
2 files changed, 4 insertions, 0 deletions
diff --git a/.emacs.d/lisp/init-tramp.el b/.emacs.d/lisp/init-tramp.el
index 7d4d17c..088d68a 100644
--- a/.emacs.d/lisp/init-tramp.el
+++ b/.emacs.d/lisp/init-tramp.el
@@ -8,6 +8,7 @@
   (add-to-list 'tramp-remote-path "/run/current-system/sw/bin")
   :custom
   (tramp-default-method "ssh")
+  (tramp-terminal-type "tramp")
   (vc-ignore-dir-regexp
    (format "\\(%s\\)\\|\\(%s\\)"
            vc-ignore-dir-regexp
diff --git a/nix-conf/home/includes/zsh.nix b/nix-conf/home/includes/zsh.nix
index 6cb7f1e..f9a3896 100644
--- a/nix-conf/home/includes/zsh.nix
+++ b/nix-conf/home/includes/zsh.nix
@@ -82,6 +82,9 @@
       gloga = "git log --oneline --decorate --graph --all";
     };
 
+    initExtraFirst = ''
+      [[ $TERM == "tramp" ]] && unsetopt zle && PS1='$ ' && return
+    '';
     initExtra = ''
       # Based on prezto tmux plugin
       if [[ -z "$TMUX" && -z "$EMACS" && -z "$VIM" && -z "$INSIDE_EMACS" && (-z "$SSH_TTY" || -n "$TMUX_AUTO_ATTACH") ]]; then