From 42296cc10c9f2639856cc0c84f21e3bb77ae87e4 Mon Sep 17 00:00:00 2001 From: Alexander Miller Date: Fri, 15 Feb 2019 07:39:33 +0100 Subject: [PATCH] [Dir Flattening] Disable feature for remote directories. Fixes #205 --- README.org | 2 ++ src/scripts/treemacs-dirs-to-collapse.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/README.org b/README.org index fc8e76e1..553192bb 100644 --- a/README.org +++ b/README.org @@ -281,6 +281,8 @@ your home directory when there is no node or path at point. That means that vari ~magit-status~ or ~helm-projectile-ag~ will correctly act based on the current directory or project context. ** Tramp Support Treemacs supports projects on remote directories, e.g. ~/scp:remote-server:path/to/directory~. + +However tramp support has some restrictions: ~treemacs-use-collapsed-directories~ has no effect on remote directories. ** Org support Treemacs supports storing links to its file nodes by means of ~org-store-link~. ** Additional Packages diff --git a/src/scripts/treemacs-dirs-to-collapse.py b/src/scripts/treemacs-dirs-to-collapse.py index 5d2acbaa..2685dccf 100644 --- a/src/scripts/treemacs-dirs-to-collapse.py +++ b/src/scripts/treemacs-dirs-to-collapse.py @@ -8,6 +8,10 @@ LIMIT = int(sys.argv[2]) SHOW_ALL = sys.argv[3] == 't' +if ROOT.startswith("/ssh:") or ROOT.startswith("/scp:"): + print("()") + sys.exit(0) + # special workaround for windows platforms # the default `join' implementation cannot quite deal with windows # paths in the form of "C:/A/B" & "C:/A/B/C", joining them as