[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_histo
From: |
Bruno Barbier |
Subject: |
Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring? |
Date: |
Sat, 20 Jul 2019 13:32:07 +0200 |
Hi Fan,
Fan Yang <address@hidden> writes:
> Hi Bruno,
>
> Thanks for your reply! Searching command history saves a lot of typing and
> quickens my
> workflows, I probably will still head for a solution.
>
> Some more questions, if I may,
> 1. Should I attribute this issue to TRAMP or to shell-mode?
It looks to me that shell-mode doesn't support remote shell history.
Maybe you should file an Emacs bug to request that feature.
> 2. Where should I start, is there any suggestions?
You could try to use/adapt the code below. It (mostly) works for me (it
doesn't work when Emacs reuses an existing buffer, and probably in other
cases too).
Bruno.
(defun hack:history-name-for-path (p)
"Compute a history filename for this remote path P.
Assume the path ~/.remote-histories exists."
(concat (file-name-as-directory "~/.remote-histories")
(replace-regexp-in-string
":" "-"
(replace-regexp-in-string
"/" "-"
(file-remote-p p)))
))
(defun hack:around-shell-mode (orig-fun &rest args)
"Advice around shell-mode.
When in a remote shell,
1. identify the history file for this buffer,
2. read the old history,
3. tell emacs to save that history when done.
"
(let ((rh-filename
(let ((p default-directory))
(when (file-remote-p p)
(hack:history-name-for-path p)))))
(apply orig-fun args)
(when rh-filename
(message "HACK: Redirect (remote) history for shell-mode %s at %s:
%s"
(current-buffer) default-directory rh-filename)
(setq-local comint-input-ring-file-name rh-filename)
(set-process-sentinel (get-buffer-process (current-buffer))
#'shell-write-history-on-exit)
(comint-read-input-ring t)
)))
(advice-add 'shell-mode :around 'hack:around-shell-mode)
>
> I am still going to investigate this issue a little bit, any
> suggestion/solution is appreciated!
>
> Thanks in advance,
> Fan
>
> ----- Original Message -----
> From: "Bruno Barbier" <address@hidden>
> To: "我" <address@hidden>
> Cc: "tramp-devel" <address@hidden>
> Sent: Saturday, July 20, 2019 5:20:09 AM
> Subject: Re: tramp (2.2.13.25.2); How to let shell over TRAMP read
> "~/.bash_history" as input ring?
>
> Hi Fan,
>
>
> Fan Yang <address@hidden> writes:
>> ...
>
> Sorry, I'm now thinking I've sent you in the wrong direction. You
> should probably restore tramp-histfile-override as it was.
>
>>
>> Do you know
>> 1. Why "process-command" of my remote "*shell*" buffer is "/bin/sh"
>> even though "/bin/bash" is used?
>
> Just a guess: emacs opens an 'sh' shell, then, in that shell, it runs
> 'ssh' to open a shell on the remote, and, 'ssh' opens your login shell
> ('bash'). The process-command gives the local process (/bin/sh); it
> knows nothing about the remote shell, opened by ssh.
>
> But it's just a guess really.
>
>
>> 2. What is your practice or workflow to use shell at remote machine
>> with command history awareness?
>
> I'm using shells (remote or not) all the time. I don't use history
> though, sorry.
>
> I'm using M-n, M-p for the "live current session" history. For any
> command that matters accross different sessions, I just take notes, and
> copy/paste from my notes (org mode).
>
> The variable comint-input-ring-file-name looks like the way to go for
> what you want to do. I just couldn't figure out how to make it work,
> but I didn't try that hard as I don't need it.
>
> Sorry,
>
> Bruno
>
>
>
>> Thanks~
>>
>> Fan
>>
>> ----- Original Message -----
>> From: "Bruno Barbier" <address@hidden>
>> To: "我" <address@hidden>, "tramp-devel" <address@hidden>
>> Sent: Friday, July 19, 2019 1:51:23 AM
>> Subject: Re: tramp (2.2.13.25.2); How to let shell over TRAMP read
>> "~/.bash_history" as input ring?
>>
>> Hi Fan,
>>
>> Fan Yang <address@hidden> writes:
>>
>>> Hi,
>>>
>>> What I wish:
>>> 1. Use bash at a remote server.
>>> 2. During the shell session, I want to use
>>> `(comint-history-isearch-backward-regexp)' to search command history that
>>> in "~/.bash_history" (the bash history file at remote).
>>> 3. When the shell ends (i.e. bash exit), I want to have the commands I have
>>> input appended to "~/.bash_history" (the bash history file at remote).
>>>
>>> However, when I `M-x shell' at remote
>>> 1. The input ring is empty.
>>> 2. The input won't append to "~/.bash_history" when exit.
>>>
>>> Do you have any suggestions (or solutions)?
>>>
>>
>> Did you try tramp-histfile-override ? (I didn't try it)
>>
>> Bruno
>>
>>> Best Regards,
>>> Fan
>>>
>>>
>>> Emacs : GNU Emacs 25.2.2 (x86_64-pc-linux-gnu, GTK+ Version 3.22.21)
>>> of 2017-09-23, modified by Debian
>>> Package: tramp (2.2.13.25.2)
>>>
>>> current state:
>>> ==============
>>> (setq
>>> backup-by-copying nil
>>> backup-by-copying-when-linked nil
>>> backup-by-copying-when-mismatch t
>>> backup-by-copying-when-privileged-mismatch 200
>>> backup-directory-alist nil
>>> file-name-handler-alist
>>> '(("\\(?:\\.dz\\|\\.txz\\|\\.xz\\|\\.lzma\\|\\.lz\\|\\.g?z\\|\\.\\(?:tgz\\|svgz\\|sifz\\)\\|\\.tbz2?\\|\\.bz2\\|\\.Z\\)\\(?:~\\|\\.~[-[:alnum:]:#@^._]+\\(?:~[[:digit:]]+\\)?~\\)?\\'"
>>> . jka-compr-handler)
>>> ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" .
>>> epa-file-handler)
>>> ("\\`/[^/]*\\'" . tramp-completion-file-name-handler)
>>> ("\\`/[^/|:][^/|]*:" . tramp-file-name-handler)
>>> ("\\`/:" . file-name-non-special))
>>> password-cache t
>>> password-cache-expiry 16
>>> remote-file-name-inhibit-cache 10
>>> shell-prompt-pattern "^[^#$%>\n]*[#$%>] *"
>>> tramp-actions-before-shell '((tramp-login-prompt-regexp tramp-action-login)
>>> (tramp-password-prompt-regexp
>>> tramp-action-password)
>>> (tramp-wrong-passwd-regexp
>>> tramp-action-permission-denied)
>>> (shell-prompt-pattern tramp-action-succeed)
>>> (tramp-shell-prompt-pattern tramp-action-succeed)
>>> (tramp-yesno-prompt-regexp tramp-action-yesno)
>>> (tramp-yn-prompt-regexp tramp-action-yn)
>>> (tramp-terminal-prompt-regexp
>>> tramp-action-terminal)
>>> (tramp-process-alive-regexp
>>> tramp-action-process-alive))
>>> tramp-actions-copy-out-of-band '((tramp-password-prompt-regexp
>>> tramp-action-password)
>>> (tramp-wrong-passwd-regexp
>>> tramp-action-permission-denied)
>>> (tramp-copy-failed-regexp
>>> tramp-action-permission-denied)
>>> (tramp-process-alive-regexp
>>> tramp-action-out-of-band))
>>> tramp-adb-connect-if-not-connected nil
>>> tramp-adb-method "adb"
>>> tramp-adb-program "adb"
>>> tramp-adb-prompt "(decode-coding-string (base64-decode-string
>>> \"XlwoPzpbWzpkaWdpdDpdXSp8P1wpP1woPzpbWzphbG51bTpdGztbXSpAW1s6YWxudW06XV0qW14j\nXCRdKlwpP1sjXCRdW1s6c3BhY2U6XV0=\")
>>> 'raw-text)"
>>> tramp-auto-save-directory nil
>>> tramp-awk-coding-test "test -c /dev/zero && od -v -t x1 -A n </dev/null &&
>>> busybox awk '{}' </dev/null"
>>> tramp-awk-decode "busybox awk '\\\nBEGIN {\n b64 =
>>> \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"\n}\n{\n
>>> for (i=1; i<=length($0); i++) {\n c=index(b64, substr($0,i,1))\n
>>> if(c--) {\n for(b=0; b<6; b++) {\n o=o*2+int(c/32);
>>> c=(c*2)%%64\n if(++obc==8) {\n if (o) {\n printf
>>> \"%%c\", o\n } else {\n system(\"dd if=/dev/zero bs=1
>>> count=1 2>/dev/null\")\n }\n obc=0; o=0\n }\n
>>> }\n }\n }\n}'"
>>> tramp-awk-encode "od -v -t x1 -A n | busybox awk '\\\nBEGIN {\n b64 =
>>> \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"\n b16
>>> = \"0123456789abcdef\"\n}\n{\n for (c=1; c<=length($0); c++) {\n
>>> d=index(b16, substr($0,c,1))\n if (d--) {\n for (b=1; b<=4; b++)
>>> {\n o=o*2+int(d/8); d=(d*2)%%16\n if (++obc==6) {\n
>>> printf substr(b64,o+1,1)\n if (++rc>75) { printf \"\\n\"; rc=0 }\n
>>> obc=0; o=0\n }\n }\n }\n }\n}\nEND {\n if (obc)
>>> {\n tail=(obc==2) ? \"==\\n\" : \"=\\n\"\n while (obc++<6) { o=o*2
>>> }\n printf \"%%c\", substr(b64,o+1,1)\n } else {\n tail=\"\\n\"\n
>>> }\n printf tail\n}'"
>>> tramp-backup-directory-alist nil
>>> tramp-bluez-discover-devices-timeout 60
>>> tramp-bug-report-address "address@hidden"
>>> tramp-cache-data '((["scp" nil "val17" nil nil] ("uname" "Linux
>>> 4.15.0-36-generic")
>>> ("locale" "LC_ALL=en_US.utf8") ("test" "test")
>>> ("remote-path"
>>> ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin"
>>> "/usr/local/sbin")
>>> )
>>> ("remote-shell" "/bin/sh") ("~" "/home/yf") ("file-exists"
>>> "test -e")
>>> ("ls" "/bin/ls --color=never") ("ls-dired" t) ("stat" nil)
>>> ("perl-file-spec" t) ("perl-cwd-realpath" t) ("perl"
>>> "\\perl")
>>> ("id" "/usr/bin/id") ("gid-integer" 1012) ("gid-string"
>>> "yf")
>>> ("readlink" "\\readlink"))
>>> (["ssh" "yf" "val17" nil nil] ("uname" "Linux
>>> 4.15.0-36-generic")
>>> ("locale" "LC_ALL=en_US.utf8") ("test" "test")
>>> ("remote-path"
>>> ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin"
>>> "/usr/local/sbin")
>>> )
>>> ("remote-shell" "/bin/sh") ("~" "/home/yf") ("file-exists"
>>> "test -e")
>>> ("ls" "/bin/ls --color=never") ("ls-dired" t) ("stat" nil)
>>> ("perl-file-spec" t) ("perl-cwd-realpath" t) ("perl"
>>> "\\perl")
>>> ("id" "/usr/bin/id") ("gid-integer" 1012) ("gid-string"
>>> "yf")
>>> ("readlink" "\\readlink"))
>>> (["ssh" nil "val17" nil nil] ("uname" "Linux
>>> 4.15.0-36-generic")
>>> ("locale" "LC_ALL=en_US.utf8") ("test" "test")
>>> ("remote-path"
>>> ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin"
>>> "/usr/local/sbin")
>>> )
>>> ("remote-shell" "/bin/sh") ("~" "/home/yf") ("file-exists"
>>> "test -e")
>>> ("ls" "/bin/ls --color=never") ("ls-dired" t) ("stat" nil)
>>> ("perl-file-spec" t) ("perl-cwd-realpath" t) ("perl"
>>> "\\perl")
>>> ("id" "/usr/bin/id") ("gid-integer" 1012) ("gid-string"
>>> "yf")
>>> ("readlink" "\\readlink"))
>>> (["scp" "yf" "val17" nil nil] ("first-password-request" t)
>>> ("uname" "Linux 4.15.0-36-generic") ("locale"
>>> "LC_ALL=en_US.utf8")
>>> ("test" "test")
>>> ("remote-path"
>>> ("/bin" "/usr/bin" "/sbin" "/usr/sbin" "/usr/local/bin"
>>> "/usr/local/sbin")
>>> )
>>> ("remote-shell" "/bin/sh") ("~" "/home/yf") ("file-exists"
>>> "test -e")
>>> ("ls" "/bin/ls --color=never") ("ls-dired" t) ("stat" nil)
>>> ("perl-file-spec" t) ("perl-cwd-realpath" t) ("perl"
>>> "\\perl")
>>> ("id" "/usr/bin/id") ("gid-integer" 1012) ("gid-string"
>>> "yf")
>>> ("process-name" nil) ("process-buffer" nil))
>>> (nil ("locale" "en_US.utf8"))
>>> ("#<process *tramp/scp yf@val17*>" ("vector" ["scp" "yf"
>>> "val17" "" nil])
>>> ("temp-file" "/tmp/tramp.3235D7G")
>>> ("last-cmd-time" (23856 28362 396478 528000))
>>> ("remote-shell" "/bin/sh")
>>> ("chunksize" 0) ("connected" t)
>>> ("scripts" ("tramp_perl_file_attributes")) ("device" (-1 .
>>> 1)))
>>> (["scp" "yf" "val17" "" nil] nil)
>>> (["scp" "yf" "val17" "/bin" nil]
>>> ("file-directory-p" ((23856 28355 843559 379000) . t)))
>>> (["scp" "yf" "val17" "/usr/bin" nil]
>>> ("file-directory-p" ((23856 28355 845226 668000) . t)))
>>> (["scp" "yf" "val17" "/sbin" nil]
>>> ("file-directory-p" ((23856 28355 846813 984000) . t)))
>>> (["scp" "yf" "val17" "/usr/sbin" nil]
>>> ("file-directory-p" ((23856 28355 848450 586000) . t)))
>>> (["scp" "yf" "val17" "/usr/local/bin" nil]
>>> ("file-directory-p" ((23856 28355 850104 314000) . t)))
>>> (["scp" "yf" "val17" "/usr/local/sbin" nil]
>>> ("file-directory-p" ((23856 28355 851705 732000) . t)))
>>> (["scp" "yf" "val17" "/local/bin" nil]
>>> ("file-directory-p" ((23856 28355 853343 826000))))
>>> (["scp" "yf" "val17" "/local/freeware/bin" nil]
>>> ("file-directory-p" ((23856 28355 854989 632000))))
>>> (["scp" "yf" "val17" "/local/gnu/bin" nil]
>>> ("file-directory-p" ((23856 28355 856635 63000))))
>>> (["scp" "yf" "val17" "/usr/freeware/bin" nil]
>>> ("file-directory-p" ((23856 28355 858330 69000))))
>>> (["scp" "yf" "val17" "/usr/pkg/bin" nil]
>>> ("file-directory-p" ((23856 28355 859966 599000))))
>>> (["scp" "yf" "val17" "/usr/contrib/bin" nil]
>>> ("file-directory-p" ((23856 28355 861678 458000))))
>>> (["scp" "yf" "val17" "/opt/bin" nil]
>>> ("file-directory-p" ((23856 28355 863338 952000))))
>>> (["scp" "yf" "val17" "/opt/sbin" nil]
>>> ("file-directory-p" ((23856 28355 864995 289000))))
>>> (["scp" "yf" "val17" "/opt/local/bin" nil]
>>> ("file-directory-p" ((23856 28355 866638 18000))))
>>> (["scp" "yf" "val17" "/home/yf" nil]
>>> ("file-exists-p" ((23856 28355 890076 798000) . t))
>>> ("file-directory-p" ((23856 28355 892921 753000) . t))
>>> ("file-attributes-integer"
>>> ((23856 28356 5442 818000) t 10 1012 1012 (23856 26322)
>>> (23856 26259)
>>> (23856 26259) 4096 "drwxr-xr-x" nil (40 . 1) (-1 . 1))
>>> )
>>> ("file-attributes-string"
>>> ((23856 28362 401276 862000) t 10 "yf" "yf" (23856 26322)
>>> (23856 26259)
>>> (23856 26259) 4096 "drwxr-xr-x" nil (40 . 1) (-1 . 1))
>>> )
>>> ("file-readable-p" ((23856 28362 401307 743000) . t)))
>>> (["scp" "yf" "val17" "/bin/bash" nil]
>>> ("file-exists-p" ((23856 28362 385225 996000) . t)))
>>> ("#<process shell>" ("vector" ["scp" "yf" "val17"
>>> "/home/yf/" nil])
>>> ("last-cmd-time" (23856 28362 470703 888000))
>>> ("remote-shell" "/bin/sh")
>>> ("chunksize" 0) ("connected" t))
>>> )
>>> tramp-cache-data-changed t
>>> tramp-cache-unload-hook '(#[nil "\300\301\302\"\207"
>>> [remove-hook kill-emacs-hook
>>> tramp-dump-connection-properties] 3]
>>> #[nil
>>> "\300\301\302\"\210\300\303\302\"\210\300\304\302\"\207"
>>> [remove-hook before-revert-hook
>>> tramp-flush-file-function
>>> eshell-pre-command-hook kill-buffer-hook]
>>> 3]
>>> )
>>> tramp-chunksize nil
>>> tramp-color-escape-sequence-regexp "(decode-coding-string
>>> (base64-decode-string \"G1tbOzAtOV0rbQ==\") 'raw-text)"
>>> tramp-completion-file-name-handler-alist '((file-name-all-completions .
>>>
>>> tramp-completion-handle-file-name-all-completions)
>>> (file-name-completion .
>>>
>>> tramp-completion-handle-file-name-completion)
>>> )
>>> tramp-completion-file-name-regexp "\\`/[^/]*\\'"
>>> tramp-completion-file-name-regexp-separate "\\`/\\([[][^]]*\\)?\\'"
>>> tramp-completion-file-name-regexp-unified "\\`/[^/]*\\'"
>>> tramp-completion-function-alist '(("fcp" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("psftp" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("pscp" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("plink" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("ksu" (tramp-parse-passwd "/etc/passwd"))
>>> ("sudo" (tramp-parse-passwd "/etc/passwd"))
>>> ("su" (tramp-parse-passwd "/etc/passwd"))
>>> ("nc" (tramp-parse-hosts "/etc/hosts"))
>>> ("telnet" (tramp-parse-hosts "/etc/hosts"))
>>> ("sshx" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("ssh" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("rsync" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("scpx" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("scp" (tramp-parse-shosts
>>> "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> ("adb" (tramp-adb-parse-device-names "")))
>>> tramp-completion-function-alist-putty '((tramp-parse-putty
>>> "~/.putty/sessions"))
>>> tramp-completion-function-alist-rsh '((tramp-parse-rhosts
>>> "/etc/hosts.equiv")
>>> (tramp-parse-rhosts "~/.rhosts"))
>>> tramp-completion-function-alist-ssh '((tramp-parse-rhosts
>>> "/etc/hosts.equiv")
>>> (tramp-parse-rhosts "/etc/shosts.equiv")
>>> (tramp-parse-shosts
>>> "/etc/ssh_known_hosts")
>>> (tramp-parse-sconfig "/etc/ssh_config")
>>> (tramp-parse-shostkeys
>>> "/etc/ssh2/hostkeys")
>>> (tramp-parse-sknownhosts
>>> "/etc/ssh2/knownhosts")
>>> (tramp-parse-rhosts "~/.rhosts")
>>> (tramp-parse-rhosts "~/.shosts")
>>> (tramp-parse-shosts "~/.ssh/known_hosts")
>>> (tramp-parse-sconfig "~/.ssh/config"))
>>> tramp-completion-function-alist-su '((tramp-parse-passwd "/etc/passwd"))
>>> tramp-completion-function-alist-telnet '((tramp-parse-hosts "/etc/hosts"))
>>> tramp-completion-mode nil
>>> tramp-completion-reread-directory-timeout 10
>>> tramp-connection-min-time-diff 5
>>> tramp-connection-properties nil
>>> tramp-connection-timeout 60
>>> tramp-copy-failed-regexp "\\(.+: \\(No such file or directory\\|Permission
>>> denied\\|is a directory\\|not a regular file\\)\\)\\s-*"
>>> tramp-copy-size-limit 10240
>>> tramp-current-connection '(("scp" "yf" "val17") 23856 28355 498686 667000)
>>> tramp-current-host "val17"
>>> tramp-current-method "scp"
>>> tramp-current-user "yf"
>>> tramp-debug-on-error nil
>>> tramp-debug-outline-regexp "[0-9]+:[0-9]+:[0-9]+\\.[0-9]+ [a-z0-9-]+
>>> (\\([0-9]+\\)) #"
>>> tramp-default-host "Tesla"
>>> tramp-default-host-alist '(("adb" nil ""))
>>> tramp-default-method "scp"
>>> tramp-default-method-alist '((nil "%" "smb")
>>>
>>> ("\\`\\(127\\.0\\.0\\.1\\|::1\\|Tesla\\|localhost6?\\)\\'"
>>> "\\`root\\'" "su")
>>> (nil "\\`\\(anonymous\\|ftp\\)\\'" "ftp")
>>> ("\\`ftp\\." nil "ftp"))
>>> tramp-default-proxies-alist nil
>>> tramp-default-user nil
>>> tramp-default-user-alist '(("\\`smb\\'" nil nil)
>>>
>>> ("\\`\\(?:fcp\\|krlogin\\|nc\\|r\\(?:cp\\|emcp\\|sh\\)\\|telnet\\)\\'" nil
>>> "fan")
>>> ("\\`\\(?:ksu\\|su\\(?:do\\)?\\)\\'" nil "root")
>>> ("\\`\\(?:socks\\|tunnel\\)\\'" nil "fan")
>>> ("\\`synce\\'" nil nil))
>>> tramp-devices 1
>>> tramp-domain-regexp "[-a-zA-Z0-9_.]+"
>>> tramp-echo-mark "_echo"
>>> tramp-echo-mark-marker "_echo"
>>> tramp-echo-mark-marker-length 5
>>> tramp-echoed-echo-mark-regexp "_echo\\(\\( \\)?\\)\\{5\\}"
>>> tramp-encoding-command-interactive "-i"
>>> tramp-encoding-command-switch "-c"
>>> tramp-encoding-shell "/bin/sh"
>>> tramp-end-of-heredoc "9afcc3e434511e46e4b1da384a003e5c"
>>> tramp-end-of-output "///8fd8293e1ef788d3e40d5a4f4c2e3e6a#$"
>>> tramp-file-mode-type-map '((0 . "-") (1 . "p") (2 . "c") (3 . "m") (4 .
>>> "d") (5 . "?")
>>> (6 . "b") (7 . "?") (8 . "-") (9 . "n") (10 . "l")
>>> (11 . "?")
>>> (12 . "s") (13 . "D") (14 . "w"))
>>> tramp-file-name-regexp "\\`/[^/|:][^/|]*:"
>>> tramp-file-name-regexp-separate "\\`/\\[.*\\]"
>>> tramp-file-name-regexp-unified "\\`/[^/|:][^/|]*:"
>>> tramp-file-name-structure
>>> '("^/\\(\\(?:\\(?:\\([a-zA-Z_0-9-]+\\):\\)?\\(?:\\([^/|:
>>> ]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?|\\)+\\)?\\(?:\\([a-zA-Z_0-9-]+\\):\\)?\\(?:\\([^/|:
>>>
>>> ]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?:\\(.*$\\)"
>>> 5 6 7 8 1)
>>> tramp-foreign-file-name-handler-alist '((tramp-smb-file-name-p .
>>> tramp-smb-file-name-handler)
>>> (tramp-gvfs-file-name-p .
>>> tramp-gvfs-file-name-handler)
>>> (tramp-ftp-file-name-p .
>>> tramp-ftp-file-name-handler)
>>> (tramp-adb-file-name-p .
>>> tramp-adb-file-name-handler)
>>> (identity .
>>> tramp-sh-file-name-handler))
>>> tramp-ftp-method "ftp"
>>> tramp-gvfs-methods '("afp" "dav" "davs" "obex" "sftp" "synce")
>>> tramp-gvfs-zeroconf-domain "local"
>>> tramp-gw-socks-method "socks"
>>> tramp-gw-tunnel-method "tunnel"
>>> tramp-half-a-year '(241 17024)
>>> tramp-handle-file-local-copy-hook nil
>>> tramp-handle-write-region-hook nil
>>> tramp-histfile-override "~/.bash_history"
>>> tramp-host-regexp "[a-zA-Z0-9_.-]+"
>>> tramp-host-with-port-regexp "\\([a-zA-Z0-9_.-]+\\)#\\([0-9]+\\)"
>>> tramp-initial-end-of-output "#$ "
>>> tramp-inline-compress-commands '(("gzip" "gzip -d") ("bzip2" "bzip2 -d")
>>> ("xz" "xz -d")
>>> ("compress" "compress -d"))
>>> tramp-inline-compress-start-size 4096
>>> tramp-inodes 0
>>> tramp-ipv6-regexp "\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+"
>>> tramp-local-coding-commands '((b64 base64-encode-region
>>> base64-decode-region)
>>> (uu tramp-uuencode-region uudecode-decode-region)
>>> (pack
>>> "perl -e 'binmode STDIN; binmode STDOUT; print
>>> pack(q{u*}, join q{}, <>)'" "perl -e 'binmode STDIN; binmode STDOUT; print
>>> unpack(q{u*}, join q{}, <>)'")
>>> )
>>> tramp-local-end-of-line "\n"
>>> tramp-local-host-regexp
>>> "\\`\\(127\\.0\\.0\\.1\\|::1\\|Tesla\\|localhost6?\\)\\'"
>>> tramp-localname-regexp ".*$"
>>> tramp-locked nil
>>> tramp-locker nil
>>> tramp-login-prompt-regexp ".*\\(user\\|login\\)\\( .*\\)?: *"
>>> tramp-message-show-message t
>>> tramp-method-regexp "[a-zA-Z_0-9-]+"
>>> tramp-methods '(("smb" (tramp-remote-shell "") (tramp-tmpdir "/C$/Temp"))
>>> ("fcp" (tramp-login-program "fsh")
>>> (tramp-login-args (("%h") ("-l" "%u") ("sh" "-i")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-i") ("-c")) (tramp-copy-program
>>> "fcp")
>>> (tramp-copy-args (("-p" "%k"))) (tramp-copy-keep-date t))
>>> ("psftp" (tramp-login-program "plink")
>>> (tramp-login-args
>>> (("-l" "%u") ("-P" "%p") ("-ssh") ("-t") ("%h") ("\"")
>>> ("env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=#$ '") ("/bin/sh")
>>> ("\""))
>>> )
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-copy-program "pscp")
>>> (tramp-copy-args
>>> (("-l" "%u") ("-P" "%p") ("-sftp") ("-p" "%k") ("-q")
>>> ("-r")))
>>> (tramp-copy-keep-date t) (tramp-copy-recursive t))
>>> ("pscp" (tramp-login-program "plink")
>>> (tramp-login-args
>>> (("-l" "%u") ("-P" "%p") ("-ssh") ("-t") ("%h") ("\"")
>>> ("env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=#$ '") ("/bin/sh")
>>> ("\""))
>>> )
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-copy-program "pscp")
>>> (tramp-copy-args
>>> (("-l" "%u") ("-P" "%p") ("-scp") ("-p" "%k") ("-q") ("-r")))
>>> (tramp-copy-keep-date t) (tramp-copy-recursive t)
>>> (tramp-default-port 22))
>>> ("plinkx" (tramp-login-program "plink")
>>> (tramp-login-args
>>> (("-load") ("%h") ("-t") ("\"")
>>> ("env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=#$ '") ("/bin/sh")
>>> ("\""))
>>> )
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")))
>>> ("plink" (tramp-login-program "plink")
>>> (tramp-login-args
>>> (("-l" "%u") ("-P" "%p") ("-ssh") ("-t") ("%h") ("\"")
>>> ("env 'TERM=dumb' 'PROMPT_COMMAND=' 'PS1=#$ '") ("/bin/sh")
>>> ("\""))
>>> )
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-default-port 22))
>>> ("krlogin" (tramp-login-program "krlogin")
>>> (tramp-login-args (("%h") ("-l" "%u") ("-x")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")))
>>> ("ksu" (tramp-login-program "ksu") (tramp-login-args (("%u")
>>> ("-q")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-connection-timeout
>>> 10))
>>> ("sudo" (tramp-login-program "sudo")
>>> (tramp-login-args
>>> (("-u" "%u") ("-s") ("-H")
>>> ("-p" "P\"\"a\"\"s\"\"s\"\"w\"\"o\"\"r\"\"d\"\":"))
>>> )
>>> (tramp-login-env (("SHELL") ("/bin/sh"))) (tramp-remote-shell
>>> "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-connection-timeout 10))
>>> ("su" (tramp-login-program "su") (tramp-login-args (("-")
>>> ("%u")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-connection-timeout
>>> 10))
>>> ("nc" (tramp-login-program "telnet")
>>> (tramp-login-args (("%h") ("%p") ("2>/dev/null")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-copy-program "nc")
>>> (tramp-copy-args (("-w" "1") ("-v") ("%h") ("%r")))
>>> (tramp-remote-copy-program "nc")
>>> (tramp-remote-copy-args (("-l") ("-p" "%r") ("2>/dev/null")))
>>> (tramp-default-port 23))
>>> ("telnet" (tramp-login-program "telnet")
>>> (tramp-login-args (("%h") ("%p") ("2>/dev/null")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-default-port 23))
>>> ("sshx" (tramp-login-program "ssh")
>>> (tramp-login-args
>>> (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("-t" "-t")
>>> ("%h")
>>> ("/bin/sh"))
>>> )
>>> (tramp-async-args (("-q"))) (tramp-remote-shell "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-gw-args
>>> (("-o" "GlobalKnownHostsFile=/dev/null")
>>> ("-o" "UserKnownHostsFile=/dev/null") ("-o"
>>> "StrictHostKeyChecking=no"))
>>> )
>>> (tramp-default-port 22))
>>> ("ssh" (tramp-login-program "ssh")
>>> (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e"
>>> "none") ("%h")))
>>> (tramp-async-args (("-q"))) (tramp-remote-shell "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-gw-args
>>> (("-o" "GlobalKnownHostsFile=/dev/null")
>>> ("-o" "UserKnownHostsFile=/dev/null") ("-o"
>>> "StrictHostKeyChecking=no"))
>>> )
>>> (tramp-default-port 22))
>>> ("remsh" (tramp-login-program "remsh")
>>> (tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-shell
>>> "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c")))
>>> ("rsh" (tramp-login-program "rsh") (tramp-login-args (("%h")
>>> ("-l" "%u")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")))
>>> ("rsync" (tramp-login-program "ssh")
>>> (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e"
>>> "none") ("%h")))
>>> (tramp-async-args (("-q"))) (tramp-remote-shell "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-copy-program "rsync") (tramp-copy-args (("-t" "%k")
>>> ("-r")))
>>> (tramp-copy-env (("RSYNC_RSH") ("ssh" "%c")))
>>> (tramp-copy-keep-date t)
>>> (tramp-copy-keep-tmpfile t) (tramp-copy-recursive t))
>>> ("scpx" (tramp-login-program "ssh")
>>> (tramp-login-args
>>> (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("-t" "-t")
>>> ("%h")
>>> ("/bin/sh"))
>>> )
>>> (tramp-async-args (("-q"))) (tramp-remote-shell "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-copy-program "scp")
>>> (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r")
>>> ("%c")))
>>> (tramp-copy-keep-date t) (tramp-copy-recursive t)
>>> (tramp-gw-args
>>> (("-o" "GlobalKnownHostsFile=/dev/null")
>>> ("-o" "UserKnownHostsFile=/dev/null") ("-o"
>>> "StrictHostKeyChecking=no"))
>>> )
>>> (tramp-default-port 22))
>>> ("scp" (tramp-login-program "ssh")
>>> (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e"
>>> "none") ("%h")))
>>> (tramp-async-args (("-q"))) (tramp-remote-shell "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-copy-program "scp")
>>> (tramp-copy-args (("-P" "%p") ("-p" "%k") ("-q") ("-r")
>>> ("%c")))
>>> (tramp-copy-keep-date t) (tramp-copy-recursive t)
>>> (tramp-gw-args
>>> (("-o" "GlobalKnownHostsFile=/dev/null")
>>> ("-o" "UserKnownHostsFile=/dev/null") ("-o"
>>> "StrictHostKeyChecking=no"))
>>> )
>>> (tramp-default-port 22))
>>> ("remcp" (tramp-login-program "remsh")
>>> (tramp-login-args (("%h") ("-l" "%u"))) (tramp-remote-shell
>>> "/bin/sh")
>>> (tramp-remote-shell-login ("-l")) (tramp-remote-shell-args
>>> ("-c"))
>>> (tramp-copy-program "rcp") (tramp-copy-args (("-p" "%k")))
>>> (tramp-copy-keep-date t))
>>> ("rcp" (tramp-login-program "rsh") (tramp-login-args (("%h")
>>> ("-l" "%u")))
>>> (tramp-remote-shell "/bin/sh") (tramp-remote-shell-login
>>> ("-l"))
>>> (tramp-remote-shell-args ("-c")) (tramp-copy-program "rcp")
>>> (tramp-copy-args (("-p" "%k") ("-r"))) (tramp-copy-keep-date
>>> t)
>>> (tramp-copy-recursive t))
>>> ("synce") ("sftp") ("obex") ("davs") ("dav") ("afp") ("ftp")
>>> ("adb" (tramp-tmpdir "/data/local/tmp") (tramp-default-port
>>> 5555)))
>>> tramp-mode t
>>> tramp-obsolete-methods '("ssh1" "ssh2" "scp1" "scp2" "scpc" "rsyncc"
>>> "plink1")
>>> tramp-operation-not-permitted-regexp "\\(preserving times.*\\|set
>>> mode\\):\\s-*\\(Operation not permitted\\)"
>>> tramp-parse-time-months '(("jan" . 1) ("feb" . 2) ("mar" . 3) ("apr" . 4)
>>> ("may" . 5)
>>> ("jun" . 6) ("jul" . 7) ("aug" . 8) ("sep" . 9)
>>> ("oct" . 10)
>>> ("nov" . 11) ("dec" . 12))
>>> tramp-password-prompt-regexp "(decode-coding-string (base64-decode-string
>>> \"Xi4qXChcKD86YWRnYW5nc2tvZGVcfGNvbnRyYXNlXCg/OlwoPzpueVx8w7FcKWFcKVx8Z2VzbG9c\nfGhcKD86XCg/OmFzxYJcfGVzbFwpb1wpXHxpcGhhc2l3ZWRpXHxqZWxzesOzXHxsXCg/Om96aW5r\nYVx8w7ZzZW5vcmRcKVx8bVwoPzpvdCBkZSBwYXNzZVx84bqtdCBraOG6qXVcKVx8cGFcKD86cm9s\nYVx8c1woPzphaGl0emFcfHNcKD86IHBocmFzZVx8Y29kZVx8b3JkXHxwaHJhc2VcfHdvcltkdF1c\nKVx8dm9ydG9cKVwpXHxzXCg/OmFsYXNhbmFcfGVuaGFcfGxhcHRhxb5vZGlzXClcfHdhY2h0d29v\ncmRcfNC70L7Qt9C40L3QutCwXHzQv9Cw0YDQvtC70YxcfNeh16HXnteUXHzZg9mE2YXYqSDYp9mE\n2LPYsVx84KSX4KWB4KSq4KWN4KSk4KS24KSs4KWN4KSmXHzgpLbgpKzgpY3gpKbgpJXgpYLgpJ9c\nfOCml+CngeCmquCnjeCmpOCmtuCmrOCnjeCmplx84Kaq4Ka+4Ka44KaT4Kef4Ka+4Kaw4KeN4Kah\nXHzgqKrgqL7gqLjgqLXgqLDgqKFcfOCqquCqvuCquOCqteCqsOCrjeCqoVx84Kyq4K2N4Kyw4Kys\n4K2H4Ky2IOCsuOCsmeCtjeCsleCth+CspFx84K6V4K6f4K614K+B4K6a4K+N4K6a4K+K4K6y4K+N\nXHzgsLjgsILgsJXgsYfgsKTgsKrgsKbgsK7gsYFcfOCyl+CzgeCyquCzjeCypOCyquCyplx84LSF\n4LSf4LSv4LS+4LSz4LS14LS+4LSV4LWN4LSV4LWNXHzgtrvgt4Tgt4Pgt4rgtrTgtq/gtrpcfOGe\nluGetuGegOGfkuGemeGen+GemOGfkuGehOGetuGej+Gfi1x844OR44K544Ov44O844OJXHzlr4Zb\n56CB56K8XVx87JWU7Zi4XClcKS4qOgA/ICo=\")
>>> 'raw-text)"
>>> tramp-perl-decode "%s -e '\n# This script contributed by Juanma
>>> Barranquero <address@hidden>.\n# Copyright (C) 2002-2017 Free Software
>>> Foundation, Inc.\nuse strict;\n\nmy %%trans = do {\n my $i = 0;\n map
>>> {($_, substr(unpack(q(B8), chr $i++), 2, 6))}\n split //,
>>> q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/)\n};\n\nmy
>>> %%bytes = map {(unpack(q(B8), chr $_), chr $_)} 0 ..
>>> 255;\n\nbinmode(\\*STDOUT);\n\n# We are going to accumulate into $pending
>>> to accept any line length\n# (we do not check they are <= 76 chars as the
>>> RFC says)\nmy $pending = q();\n\nwhile (my $data = <STDIN>) {\n chomp
>>> $data;\n\n # If we find one or two =, we have reached the end and\n #
>>> any following data is to be discarded\n my $finished = $data =~
>>> s/(==?).*/$1/;\n $pending .= $data;\n\n my $len = length($pending);\n
>>> my $chunk = substr($pending, 0, $len & ~3);\n $pending =
>>> substr($pending, $len & ~3 + 1);\n\n # Easy method: translate from chars
>>> to (pregenerated) six-bit packets, join,\n # split in 8-bit chunks and
>>> convert back to char.\n print join q(),\n map $bytes{$_},\n
>>> ((join q(), map {$trans{$_} || q()} split //, $chunk) =~ /......../g);\n\n
>>> last if $finished;\n}' 2>/dev/null"
>>> tramp-perl-decode-with-module "%s -MMIME::Base64 -0777 -ne 'print
>>> decode_base64($_)' 2>/dev/null"
>>> tramp-perl-directory-files-and-attributes "%s -e '\nchdir($ARGV[0]) or
>>> printf(\"\\\"Cannot change to $ARGV[0]: $''!''\\\"\\n\"),
>>> exit();\nopendir(DIR,\".\") or printf(\"\\\"Cannot open directory $ARGV[0]:
>>> $''!''\\\"\\n\"), exit();\n@list = readdir(DIR);\nclosedir(DIR);\n$n =
>>> scalar(@list);\nprintf(\"(\\n\");\nfor($i = 0; $i < $n; $i++)\n{\n
>>> $filename = $list[$i];\n @stat = lstat($filename);\n if (($stat[2] &
>>> 0170000) == 0120000)\n {\n $type = readlink($filename);\n
>>> $type =~ s/\"/\\\\\"/g;\n $type = \"\\\"$type\\\"\";\n }\n
>>> elsif (($stat[2] & 0170000) == 040000)\n {\n $type = \"t\";\n
>>> }\n else\n {\n $type = \"nil\"\n };\n $uid = ($ARGV[1]
>>> eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) . \"\\\"\";\n
>>> $gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" . getgrgid($stat[5])
>>> . \"\\\"\";\n $filename =~ s/\"/\\\\\"/g;\n printf(\n
>>> \"(\\\"%%s\\\" %%s %%u %%s %%s (%%u %%u) (%%u %%u) (%%u %%u) %%u.0 %%u t
>>> (%%u . %%u) (%%u . %%u))\\n\",\n $filename,\n $type,\n
>>> $stat[3],\n $uid,\n $gid,\n $stat[8] >> 16 & 0xffff,\n
>>> $stat[8] & 0xffff,\n $stat[9] >> 16 & 0xffff,\n
>>> $stat[9] & 0xffff,\n $stat[10] >> 16 & 0xffff,\n $stat[10] &
>>> 0xffff,\n $stat[7],\n $stat[2],\n $stat[1] >> 16 &
>>> 0xffff,\n $stat[1] & 0xffff,\n $stat[0] >> 16 & 0xffff,\n
>>> $stat[0] & 0xffff);\n}\nprintf(\")\\n\");' \"$1\" \"$2\" 2>/dev/null"
>>> tramp-perl-encode "%s -e '\n# This script contributed by Juanma
>>> Barranquero <address@hidden>.\n# Copyright (C) 2002-2017 Free Software
>>> Foundation, Inc.\nuse strict;\n\nmy %%trans = do {\n my $i = 0;\n map
>>> {(substr(unpack(q(B8), chr $i++), 2, 6), $_)}\n split //,
>>> q(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/);\n};\nmy
>>> $data;\n\n# We read in chunks of 54 bytes, to generate output lines\n# of
>>> 72 chars (plus end of line)\nwhile (read STDIN, $data, 54) {\n my $pad =
>>> q();\n\n # Only for the last chunk, and only if did not fill the last
>>> three-byte packet\n if (eof) {\n my $mod = length($data) %% 3;\n
>>> $pad = q(=) x (3 - $mod) if $mod;\n }\n\n # Not the fastest
>>> method, but it is simple: unpack to binary string, split\n # by groups
>>> of 6 bits and convert back from binary to byte; then map into\n # the
>>> translation table\n print\n join q(),\n map($trans{$_},\n
>>> (substr(unpack(q(B*), $data) . q(00000), 0, 432) =~ /....../g)),\n
>>> $pad,\n qq(\\n);\n}' 2>/dev/null"
>>> tramp-perl-encode-with-module "%s -MMIME::Base64 -0777 -ne 'print
>>> encode_base64($_)' 2>/dev/null"
>>> tramp-perl-file-attributes "%s -e '\n@stat = lstat($ARGV[0]);\nif (!@stat)
>>> {\n print \"nil\\n\";\n exit 0;\n}\nif (($stat[2] & 0170000) ==
>>> 0120000)\n{\n $type = readlink($ARGV[0]);\n $type =~ s/\"/\\\\\"/g;\n
>>> $type = \"\\\"$type\\\"\";\n}\nelsif (($stat[2] & 0170000) ==
>>> 040000)\n{\n $type = \"t\";\n}\nelse\n{\n $type = \"nil\"\n};\n$uid =
>>> ($ARGV[1] eq \"integer\") ? $stat[4] : \"\\\"\" . getpwuid($stat[4]) .
>>> \"\\\"\";\n$gid = ($ARGV[1] eq \"integer\") ? $stat[5] : \"\\\"\" .
>>> getgrgid($stat[5]) . \"\\\"\";\nprintf(\n \"(%%s %%u %%s %%s (%%u %%u)
>>> (%%u %%u) (%%u %%u) %%u.0 %%u t (%%u . %%u) -1)\\n\",\n $type,\n
>>> $stat[3],\n $uid,\n $gid,\n $stat[8] >> 16 & 0xffff,\n $stat[8]
>>> & 0xffff,\n $stat[9] >> 16 & 0xffff,\n $stat[9] & 0xffff,\n
>>> $stat[10] >> 16 & 0xffff,\n $stat[10] & 0xffff,\n $stat[7],\n
>>> $stat[2],\n $stat[1] >> 16 & 0xffff,\n $stat[1] & 0xffff\n);' \"$1\"
>>> \"$2\" 2>/dev/null"
>>> tramp-perl-file-name-all-completions "%s -e 'sub case {\n my $str =
>>> shift;\n if ($ARGV[2]) {\n return lc($str);\n }\n else {\n return $str;\n
>>> }\n}\nopendir(d, $ARGV[0]) || die(\"$ARGV[0]: $!\\nfail\\n\");\n@files =
>>> readdir(d); closedir(d);\nforeach $f (@files) {\n if (case(substr($f, 0,
>>> length($ARGV[1]))) eq case($ARGV[1])) {\n if (-d \"$ARGV[0]/$f\") {\n
>>> print \"$f/\\n\";\n }\n else {\n print \"$f\\n\";\n }\n }\n}\nprint
>>> \"ok\\n\"\n' \"$1\" \"$2\" \"$3\" 2>/dev/null"
>>> tramp-perl-file-truename "%s -e '\nuse File::Spec;\nuse Cwd
>>> \"realpath\";\n\nsub myrealpath {\n my ($file) = @_;\n return
>>> realpath($file) if -e $file;\n}\n\nsub recursive {\n my ($volume, @dirs)
>>> = @_;\n my $real = myrealpath(File::Spec->catpath(\n
>>> $volume, File::Spec->catdir(@dirs), \"\"));\n if ($real) {\n my
>>> ($vol, $dir) = File::Spec->splitpath($real, 1);\n return ($vol,
>>> File::Spec->splitdir($dir));\n }\n else {\n my $last =
>>> pop(@dirs);\n ($volume, @dirs) = recursive($volume, @dirs);\n
>>> push(@dirs, $last);\n return ($volume, @dirs);\n }\n}\n\n$result
>>> = myrealpath($ARGV[0]);\nif (!$result) {\n my ($vol, $dir) =
>>> File::Spec->splitpath($ARGV[0], 1);\n ($vol, @dirs) = recursive($vol,
>>> File::Spec->splitdir($dir));\n\n $result = File::Spec->catpath($vol,
>>> File::Spec->catdir(@dirs), \"\");\n}\n\n$result =~ s/\"/\\\\\"/g;\nprint
>>> \"\\\"$result\\\"\\n\";\n' \"$1\" 2>/dev/null"
>>> tramp-perl-pack "%s -e 'binmode STDIN; binmode STDOUT; print pack(q{u*},
>>> join q{}, <>)'"
>>> tramp-perl-unpack "%s -e 'binmode STDIN; binmode STDOUT; print
>>> unpack(q{u*}, join q{}, <>)'"
>>> tramp-persistency-file-name "/home/fan/.emacs.d/tramp"
>>> tramp-port-regexp "[0-9]+"
>>> tramp-postfix-hop-format "|"
>>> tramp-postfix-hop-regexp "|"
>>> tramp-postfix-host-format ":"
>>> tramp-postfix-host-regexp ":"
>>> tramp-postfix-ipv6-format "]"
>>> tramp-postfix-ipv6-regexp "]"
>>> tramp-postfix-method-format ":"
>>> tramp-postfix-method-regexp ":"
>>> tramp-postfix-user-format "@"
>>> tramp-postfix-user-regexp "@"
>>> tramp-prefix-domain-format "%"
>>> tramp-prefix-domain-regexp "%"
>>> tramp-prefix-format "/"
>>> tramp-prefix-ipv6-format "["
>>> tramp-prefix-ipv6-regexp "\\["
>>> tramp-prefix-port-format "#"
>>> tramp-prefix-port-regexp "#"
>>> tramp-prefix-regexp "^/"
>>> tramp-process-alive-regexp ""
>>> tramp-process-connection-type t
>>> tramp-remote-coding-commands '((b64 "base64" "base64 -d -i") (b64 "base64"
>>> "base64 -d")
>>> (b64 "openssl enc -base64" "openssl enc -d
>>> -base64")
>>> (b64 "mimencode -b" "mimencode -u -b")
>>> (b64 "mmencode -b" "mmencode -u -b")
>>> (b64 "recode data..base64" "recode
>>> base64..data")
>>> (b64 tramp-perl-encode-with-module
>>> tramp-perl-decode-with-module)
>>> (b64 tramp-perl-encode tramp-perl-decode)
>>> (b64 tramp-awk-encode tramp-awk-decode
>>> "test -c /dev/zero && od -v -t x1 -A n
>>> </dev/null && busybox awk '{}' </dev/null")
>>> (uu "uuencode xxx" "uudecode -o /dev/stdout"
>>> "test -c /dev/stdout")
>>> (uu "uuencode xxx" "uudecode -o -")
>>> (uu "uuencode xxx" "uudecode -p")
>>> (uu "uuencode xxx" tramp-uudecode)
>>> (pack tramp-perl-pack tramp-perl-unpack))
>>> tramp-remote-file-name-spec-regexp
>>> "\\(?:\\([a-zA-Z_0-9-]+\\):\\)?\\(?:\\([^/|:
>>> ]+\\)@\\)?\\(\\(?:[a-zA-Z0-9_.-]+\\|\\[\\(?:\\(?:\\(?:[a-zA-Z0-9]+\\)?:\\)+[a-zA-Z0-9.]+\\)?]\\)\\(?:#[0-9]+\\)?\\)?"
>>> tramp-remote-path '(tramp-default-remote-path "/bin" "/usr/bin" "/sbin"
>>> "/usr/sbin"
>>> "/usr/local/bin" "/usr/local/sbin" "/local/bin"
>>> "/local/freeware/bin"
>>> "/local/gnu/bin" "/usr/freeware/bin" "/usr/pkg/bin"
>>> "/usr/contrib/bin"
>>> "/opt/bin" "/opt/sbin" "/opt/local/bin")
>>> tramp-remote-process-environment '("TMOUT=0" "LC_CTYPE=''" "TERM=dumb"
>>> "INSIDE_EMACS='25.2.2,tramp:2.2.13.25.2'"
>>> "CDPATH="
>>> "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH="
>>> "PAGER=cat"
>>> "autocorrect=" "correct=")
>>> tramp-restricted-shell-hosts-alist nil
>>> tramp-rfn-eshadow-overlay nil
>>> tramp-rfn-eshadow-update-overlay-regexp "[^:/~]*\\(/\\|~\\)"
>>> tramp-rsh-end-of-line "\n"
>>> tramp-save-ad-hoc-proxies nil
>>> tramp-sh-extra-args '(("/bash\\'" . "-norc -noprofile"))
>>> tramp-sh-file-name-handler-alist '((add-name-to-file .
>>> tramp-sh-handle-add-name-to-file)
>>> (copy-directory .
>>> tramp-sh-handle-copy-directory)
>>> (copy-file . tramp-sh-handle-copy-file)
>>> (delete-directory .
>>> tramp-sh-handle-delete-directory)
>>> (delete-file . tramp-sh-handle-delete-file)
>>> (directory-file-name .
>>> tramp-handle-directory-file-name)
>>> (directory-files .
>>> tramp-handle-directory-files)
>>> (directory-files-and-attributes .
>>>
>>> tramp-sh-handle-directory-files-and-attributes)
>>> (dired-compress-file .
>>> tramp-sh-handle-dired-compress-file)
>>> (dired-recursive-delete-directory .
>>>
>>> tramp-sh-handle-dired-recursive-delete-directory)
>>> (dired-uncache . tramp-handle-dired-uncache)
>>> (expand-file-name .
>>> tramp-sh-handle-expand-file-name)
>>> (file-accessible-directory-p .
>>> tramp-handle-file-accessible-directory-p)
>>> (file-acl . tramp-sh-handle-file-acl)
>>> (file-attributes .
>>> tramp-sh-handle-file-attributes)
>>> (file-directory-p .
>>> tramp-sh-handle-file-directory-p)
>>> (file-equal-p . tramp-handle-file-equal-p)
>>> (file-executable-p .
>>> tramp-sh-handle-file-executable-p)
>>> (file-exists-p .
>>> tramp-sh-handle-file-exists-p)
>>> (file-in-directory-p .
>>> tramp-handle-file-in-directory-p)
>>> (file-local-copy .
>>> tramp-sh-handle-file-local-copy)
>>> (file-modes . tramp-handle-file-modes)
>>> (file-name-all-completions .
>>> tramp-sh-handle-file-name-all-completions)
>>> (file-name-as-directory .
>>> tramp-handle-file-name-as-directory)
>>> (file-name-completion .
>>> tramp-handle-file-name-completion)
>>> (file-name-directory .
>>> tramp-handle-file-name-directory)
>>> (file-name-nondirectory .
>>> tramp-handle-file-name-nondirectory)
>>> (file-newer-than-file-p .
>>> tramp-sh-handle-file-newer-than-file-p)
>>> (file-notify-add-watch .
>>> tramp-sh-handle-file-notify-add-watch)
>>> (file-notify-rm-watch .
>>> tramp-handle-file-notify-rm-watch)
>>> (file-notify-valid-p .
>>> tramp-handle-file-notify-valid-p)
>>> (file-ownership-preserved-p .
>>> tramp-sh-handle-file-ownership-preserved-p)
>>> (file-readable-p .
>>> tramp-sh-handle-file-readable-p)
>>> (file-regular-p .
>>> tramp-handle-file-regular-p)
>>> (file-remote-p . tramp-handle-file-remote-p)
>>> (file-selinux-context .
>>> tramp-sh-handle-file-selinux-context)
>>> (file-symlink-p .
>>> tramp-handle-file-symlink-p)
>>> (file-truename .
>>> tramp-sh-handle-file-truename)
>>> (file-writable-p .
>>> tramp-sh-handle-file-writable-p)
>>> (find-backup-file-name .
>>> tramp-handle-find-backup-file-name)
>>> (insert-directory .
>>> tramp-sh-handle-insert-directory)
>>> (insert-file-contents .
>>> tramp-handle-insert-file-contents)
>>> (insert-file-contents-literally .
>>>
>>> tramp-sh-handle-insert-file-contents-literally)
>>> (load . tramp-handle-load)
>>> (make-auto-save-file-name .
>>> tramp-handle-make-auto-save-file-name)
>>> (make-directory .
>>> tramp-sh-handle-make-directory)
>>> (make-symbolic-link .
>>> tramp-sh-handle-make-symbolic-link)
>>> (process-file .
>>> tramp-sh-handle-process-file)
>>> (rename-file . tramp-sh-handle-rename-file)
>>> (set-file-acl .
>>> tramp-sh-handle-set-file-acl)
>>> (set-file-modes .
>>> tramp-sh-handle-set-file-modes)
>>> (set-file-selinux-context .
>>> tramp-sh-handle-set-file-selinux-context)
>>> (set-file-times .
>>> tramp-sh-handle-set-file-times)
>>> (set-visited-file-modtime .
>>> tramp-sh-handle-set-visited-file-modtime)
>>> (shell-command . tramp-handle-shell-command)
>>> (start-file-process .
>>> tramp-sh-handle-start-file-process)
>>> (substitute-in-file-name .
>>> tramp-handle-substitute-in-file-name)
>>> (unhandled-file-name-directory .
>>> tramp-handle-unhandled-file-name-directory)
>>> (vc-registered .
>>> tramp-sh-handle-vc-registered)
>>> (verify-visited-file-modtime .
>>>
>>> tramp-sh-handle-verify-visited-file-modtime)
>>> (write-region .
>>> tramp-sh-handle-write-region))
>>> tramp-shell-prompt-pattern "(decode-coding-string (base64-decode-string
>>> \"XCg/Ol5cfA1cKVteXSMkJT4KXSojP1tdIyQlPl0gKlwoG1xbWzAtOTtdKlthLXpBLVpdICpcKSo=\")
>>> 'raw-text)"
>>> tramp-smb-acl-program "smbcacls"
>>> tramp-smb-conf "/dev/null"
>>> tramp-smb-method "smb"
>>> tramp-smb-program "smbclient"
>>> tramp-smb-winexe-program "winexe"
>>> tramp-smb-winexe-shell-command "powershell.exe"
>>> tramp-smb-winexe-shell-command-switch "-file -"
>>> tramp-ssh-controlmaster-options "-o ControlMaster=auto -o
>>> ControlPath='tramp.%%C' -o ControlPersist=no"
>>> tramp-stat-marker "/////"
>>> tramp-stat-quoted-marker "\\/\\/\\/\\/\\/"
>>> tramp-syntax 'ftp
>>> tramp-temp-buffer-file-name nil
>>> tramp-temp-buffer-name " *tramp temp*"
>>> tramp-temp-name-prefix "tramp."
>>> tramp-terminal-prompt-regexp "\\(TERM = (.*)\\|Terminal type\\?
>>> \\[.*\\]\\)\\s-*"
>>> tramp-terminal-type "dumb"
>>> tramp-unload-hook '(#[nil "\300\301\302\"\207" [unload-feature tramp-cmds
>>> force] 3]
>>> #[nil "\300\301\302\"\207" [unload-feature tramp-cache
>>> force] 3]
>>> #[nil "\300\301\302\"\207" [unload-feature tramp-sh force]
>>> 3]
>>> #[nil "\300\301\302\"\207"
>>> [remove-hook auto-save-hook
>>> tramp-set-auto-save-file-modes] 3]
>>> #[nil "\300\301\302\"\207"
>>> [remove-hook kill-buffer-hook
>>> tramp-delete-temp-file-function] 3]
>>> tramp-unload-file-name-handlers
>>> #[nil "\300\301\302\"\207"
>>> [remove-hook rfn-eshadow-update-overlay-hook
>>> tramp-rfn-eshadow-update-overlay]
>>> 3]
>>> #[nil "\300\301\302\"\207"
>>> [remove-hook rfn-eshadow-setup-minibuffer-hook
>>> tramp-rfn-eshadow-setup-minibuffer]
>>> 3]
>>> #[nil "\300\301\302\"\210\300\303\302\"\207"
>>> [unload-feature tramp-loaddefs force tramp-compat] 3]
>>> #[nil "\300\301\302\"\207" [unload-feature trampver force]
>>> 3])
>>> tramp-use-ssh-controlmaster-options t
>>> tramp-user-regexp "[^/|: ]+"
>>> tramp-user-with-domain-regexp "\\([^/|: ]+\\)%\\([-a-zA-Z0-9_.]+\\)"
>>> tramp-uudecode "(echo begin 600 %t; tail -n +2) | uudecode\ncat %t\nrm -f
>>> %t"
>>> tramp-vc-registered-file-names nil
>>> tramp-vc-registered-read-file-names "echo \"(\"\nwhile read file; do\n
>>> if %s \"$file\"; then\n echo \"(\\\"$file\\\" \\\"file-exists-p\\\" t)\"\n
>>> else\n echo \"(\\\"$file\\\" \\\"file-exists-p\\\" nil)\"\n fi\n
>>> if %s \"$file\"; then\n echo \"(\\\"$file\\\" \\\"file-readable-p\\\"
>>> t)\"\n else\n echo \"(\\\"$file\\\" \\\"file-readable-p\\\" nil)\"\n
>>> fi\ndone\necho \")\""
>>> tramp-verbose 3
>>> tramp-version "2.2.13.25.2"
>>> tramp-warned-obsolete-methods nil
>>> tramp-wrong-passwd-regexp "^.*\\(Connection
>>> \\(?:\\(?:clo\\|refu\\)sed\\)\\|Host key verification failed\\.\\|Login
>>> \\(?:[Ii]ncorrect\\)\\|N\\(?:ame or service not known\\|o supported
>>> authentication methods left to try!\\)\\|Permission denied\\|\\(?:Sorry,
>>> try again\\|Timeout, server not responding\\)\\.\\).*\\|^.*\\(Received
>>> signal [0-9]+\\).*"
>>> tramp-yesno-prompt-regexp "\\(Are you sure you want to continue connecting
>>> (yes/no)\\?\\)\\s-*"
>>> tramp-yn-prompt-regexp "\\(\\(?:Store key in cache\\? (y/\\|Update cached
>>> key\\? (y/n, Return cancels connectio\\)n)\\)\\s-*"
>>> )
>>>
>>> local variables:
>>> ================
>>> ;; *tramp/scp yf@val17*
>>> (setq-local
>>> default-directory "/scp:yf@val17:/"
>>> )
>>>
>>> load-path shadows:
>>> ==================
>>>
>>> <#part type="text/plain" encoding=base64 disposition=attachment
>>> buffer="*tramp/scp yf@val17*" description="*tramp/scp yf@val17*">
>>> <#/part>
>>>
>>>
>>> _______________________________________________
>>> Tramp-devel mailing list
>>> address@hidden
>>> https://lists.gnu.org/mailman/listinfo/tramp-devel
- tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Fan_Yang, 2019/07/18
- tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Fan Yang, 2019/07/18
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Bruno Barbier, 2019/07/18
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Fan Yang, 2019/07/18
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Bruno Barbier, 2019/07/19
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Fan Yang, 2019/07/19
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Michael Albinus, 2019/07/20
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Fan_Yang, 2019/07/20
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Michael Albinus, 2019/07/20
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?,
Bruno Barbier <=
- Re: tramp (2.2.13.25.2); How to let shell over TRAMP read "~/.bash_history" as input ring?, Fan_Yang, 2019/07/20