%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/net/ |
Current File : //usr/local/share/emacs/27.2/lisp/net/tramp-sh.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (require 'tramp) #@41 The default remote shell Tramp applies. (defconst tramp-default-remote-shell "/bin/sh" (#$ . 425)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\210\300\312\302\303\313DD\314\306\307\310\315&\210\300\316\302\303\317DD\320\306\307\310\321&\210\300\322\302\303\323DD\324\306\307\325\326\310\327& \207" [custom-declare-variable tramp-inline-compress-start-size funcall function #[0 "\300\207" [4096] 1] "The minimum size of compressing where inline transfer.\nWhen inline transfer, compress transferred data of file whose\nsize is this value or above (up to `tramp-copy-size-limit' for\nout-of-band methods).\nIf it is nil, no compression at all will be applied." :group tramp :type (choice (const nil) integer) tramp-copy-size-limit #[0 "\300\207" [10240] 1] "The maximum file size where inline copying is preferred over an out-of-the-band copy.\nIf it is nil, out-of-the-band copy will be used without a check." (choice (const nil) integer) tramp-terminal-type #[0 "\300\207" [#1="dumb"] 1 #1#] "Value of TERM environment variable for logging in to remote host.\nBecause Tramp wants to parse the output of the remote shell, it is easily\nconfused by ANSI color escape sequences and suchlike. Often, shell init\nfiles conditionalize this setup based on the TERM environment variable." string tramp-histfile-override #[0 "\300\207" [#2="~/.tramp_history"] 1 #2#] "When invoking a shell, override the HISTFILE with this value.\nWhen setting to a string, it redirects the shell history to that\nfile. Be careful when setting to \"/dev/null\"; this might\nresult in undesired results when using \"bash\" as shell.\n\nThe value t unsets any setting of HISTFILE, and sets both\nHISTFILESIZE and HISTSIZE to 0. If you set this variable to nil,\nhowever, the *override* is disabled, so the history will go to\nthe default storage location, e.g. \"$HOME/.sh_history\"." :version "25.2" (choice (const :tag "Do not override HISTFILE" nil) (const :tag "Unset HISTFILE" t) (string :tag "Redirect to a file"))] 10) #@59 Terminal control escape sequences for display attributes. (defconst tramp-display-escape-sequence-regexp "[[;0-9]+m" (#$ . 2447)) #@54 Terminal control escape sequences for device status. (defconst tramp-device-escape-sequence-regexp "[[0-9]+n" (#$ . 2584)) #@166 String used to recognize end of output. The `$' character at the end is quoted; the string cannot be detected as prompt when being sent on echoing hosts, therefore. (defvar tramp-end-of-output (byte-code "\301\302\303\304!\305 P!\"\207" [process-environment format "///%s#$" md5 prin1-to-string current-time-string] 5) (#$ . 2715)) #@40 Prompt when establishing a connection. (defconst tramp-initial-end-of-output "#$ " (#$ . 3054)) #@50 String used to recognize end of heredoc strings. (defconst tramp-end-of-heredoc (md5 tramp-end-of-output) (#$ . 3156)) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable tramp-use-ssh-controlmaster-options funcall function #[0 "\300\207" [t] 1] "Whether to use `tramp-ssh-controlmaster-options'." :group tramp :version "24.4" :type boolean] 10) #@468 Which ssh Control* arguments to use. If it is a string, it should have the form "-o ControlMaster=auto -o ControlPath=\='tramp.%%r@%%h:%%p\=' -o ControlPersist=no". Percent characters in the ControlPath spec must be doubled, because the string is used as format string. Otherwise, it will be auto-detected by Tramp, if `tramp-use-ssh-controlmaster-options' is non-nil. The value depends on the installed local ssh version. The string is used in `tramp-methods'. (defvar tramp-ssh-controlmaster-options nil (#$ . 3552)) (add-hook 'tramp--startup-hook #[0 "\304\305\306\307\310\311D\312BBBB\"\210\304\305\313\314\315\311D\316BBBB\"\210\304\305\317\320\321\322\311D\323BBBBB\"\210\304\305\324\325\326\327\311D\330BBBBB\"\210\304\305\331\332\333\334\311D\335BBBBB\"\210\304\305\336\337\340\311D\341BBBB\"\210\304\305\342\343\344\311D\345BBBB\"\210\304\305\346\347\350\351\311D\352BBBBB\"\210\304\305\353\354\355\356\311D\357BBBBB\"\210\304\305\360\361\362\311D\363BBBB\"\210\304\305\364\365\366\311D\367BBBB\"\210\304\305\370\371\372\311D\373BBBB\"\210\304\305\374\375\376\311D\377BBBB\"\210\304\305\201@ \201A \201B \311D\201C BBBB\"\210\304\305\201D \201E \201F \311D\201G BBBB\"\210\304\305\201H \201I \201J \311D\201K BBBB\"\210\304\305\201L \201M \201N \311D\201O BBBB\"\210\304\305\201P \201Q \201R \201S \201T \201U \201V \201W \201X \201Y \201Z \n#C\201[ BBBBBBBD\311D\201\\ BBBB\"\210\304\305\201] \201^ \201R \201_ \201` \201a \201b \201Y \201Z \n#C\201c BBBBBD\311D\201d BBBB\"\210\304\305\201e \201f \201R \201g \201h \201i \201j \201k \201l \201Y \201Z \n#C\201m BBBBBBBD\311D\201n BBBB\"\210\304\305\201o \201p \201R \201q \201r \201s \201t \201u \201v \201Y \201Z \n#C\201w BBBBBBBD\311D\201x BBBB\"\210\304\305\201y \201z \201{ \311D\201| BBBB\"\210\304\201} \201~ B\"\210\304\201 \201\200 \201\201 B\"\210\304\201 \201\202 \201\203 \201\204 E\"\207" [tramp-default-remote-shell tramp-terminal-type tramp-initial-end-of-output tramp-local-host-regexp add-to-list tramp-methods "rcp" (tramp-login-program "rsh") (tramp-login-args (("%h") ("-l" "%u"))) tramp-remote-shell ((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)) "remcp" (tramp-login-program "remsh") (tramp-login-args (("%h") ("-l" "%u"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c")) (tramp-copy-program "rcp") (tramp-copy-args (("-p" "%k"))) (tramp-copy-keep-date t)) "scp" (tramp-login-program "ssh") (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("%h"))) (tramp-async-args (("-q"))) ((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)) "scpx" (tramp-login-program "ssh") (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("-t" "-t") ("%h") ("%l"))) (tramp-async-args (("-q"))) ((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)) "rsync" (tramp-login-program "ssh") (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("%h"))) (tramp-async-args (("-q"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c")) (tramp-copy-program "rsync") (tramp-copy-args (("-t" "%k") ("-p") ("-r") ("-s") ("-c"))) (tramp-copy-env (("RSYNC_RSH") ("ssh" "%c"))) (tramp-copy-keep-date t) (tramp-copy-keep-tmpfile t) (tramp-copy-recursive t)) "rsh" (tramp-login-program "rsh") (tramp-login-args (("%h") ("-l" "%u"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "remsh" (tramp-login-program "remsh") (tramp-login-args (("%h") ("-l" "%u"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "ssh" (tramp-login-program "ssh") (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("%h"))) (tramp-async-args (("-q"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "sshx" (tramp-login-program "ssh") (tramp-login-args (("-l" "%u") ("-p" "%p") ("%c") ("-e" "none") ("-t" "-t") ("%h") ("%l"))) (tramp-async-args (("-q"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "telnet" (tramp-login-program "telnet") (tramp-login-args (("%h") ("%p") ("2>/dev/null"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "nc" (tramp-login-program "telnet") (tramp-login-args (("%h") ("%p") ("2>/dev/null"))) ((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")))) "su" (tramp-login-program "su") (tramp-login-args (("-") ("%u"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c")) (tramp-connection-timeout 10)) "sg" (tramp-login-program "sg") (tramp-login-args (("-") ("%u"))) ((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\"\":") ("%l"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c")) (tramp-connection-timeout 10) (tramp-session-timeout 300)) "doas" (tramp-login-program "doas") (tramp-login-args (("-u" "%u") ("-s"))) ((tramp-remote-shell-args ("-c")) (tramp-connection-timeout 10) (tramp-session-timeout 300)) "ksu" (tramp-login-program "ksu") (tramp-login-args (("%u") ("-q"))) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c")) (tramp-connection-timeout 10)) "krlogin" (tramp-login-program "krlogin") (tramp-login-args (("%h") ("-l" "%u") ("-x"))) ((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") ("\"") format "env 'TERM=%s' 'PROMPT_COMMAND=' 'PS1=%s'" (("%l") ("\"")) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "plinkx" (tramp-login-program "plink") ("-load") ("%h") ("-t") ("\"") (("%l") ("\"")) ((tramp-remote-shell-login ("-l")) (tramp-remote-shell-args ("-c"))) "pscp" (tramp-login-program "plink") ("-l" "%u") ("-P" "%p") ("-ssh") ("-t") ("%h") ("\"") (("%l") ("\"")) ((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)) "psftp" (tramp-login-program "plink") ("-l" "%u") ("-P" "%p") ("-ssh") ("-t") ("%h") ("\"") (("%l") ("\"")) ((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"))) (tramp-copy-keep-date t)) "fcp" (tramp-login-program "fsh") (tramp-login-args (("%h") ("-l" "%u") ("sh" "-i"))) ((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)) tramp-default-method-alist ("\\`root\\'" "su") tramp-default-user-alist "\\`\\(?:doas\\|ksu\\|su\\(?:do\\)?\\)\\'" (nil "root") "\\`\\(?:fcp\\|krlogin\\|nc\\|r\\(?:cp\\|emcp\\|sh\\)\\|telnet\\)\\'" nil user-login-name] 15]) #@71 Default list of (FUNCTION FILE) pairs to be examined for rsh methods. (defconst tramp-completion-function-alist-rsh '((tramp-parse-rhosts "/etc/hosts.equiv") (tramp-parse-rhosts "~/.rhosts")) (#$ . 10993)) #@71 Default list of (FUNCTION FILE) pairs to be examined for ssh methods. (defconst 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-parse-shostkeys "~/.ssh2/hostkeys") (tramp-parse-sknownhosts "~/.ssh2/knownhosts")) (#$ . 11205)) #@74 Default list of (FUNCTION FILE) pairs to be examined for telnet methods. (defconst tramp-completion-function-alist-telnet '((tramp-parse-hosts "/etc/hosts")) (#$ . 11839)) #@70 Default list of (FUNCTION FILE) pairs to be examined for su methods. (defconst tramp-completion-function-alist-su '((tramp-parse-passwd "/etc/passwd")) (#$ . 12017)) #@70 Default list of (FUNCTION FILE) pairs to be examined for sg methods. (defconst tramp-completion-function-alist-sg '((tramp-parse-etc-group "/etc/group")) (#$ . 12189)) #@78 Default list of (FUNCTION REGISTRY) pairs to be examined for putty sessions. (defconst tramp-completion-function-alist-putty (byte-code "\301\302=\203 \303\202\f \304DC\207" [system-type tramp-parse-putty windows-nt "HKEY_CURRENT_USER\\Software\\SimonTatham\\PuTTY\\Sessions" "~/.putty/sessions"] 3) (#$ . 12363)) (byte-code "\300\301\302\"\210\303\304\305\306\307DD\310\311\312\313\314&\210\303\315\305\306\316DD\317\311\312\320\321\313\322& \210\303\323\305\306\324DD\325\311\312\320\326\313\327& \207" [add-hook tramp--startup-hook #[0 "\306\307\"\210\306\310\"\210\306\311 \"\210\306\312 \"\210\306\313 \"\210\306\314\"\210\306\315\"\210\306\316 \"\210\306\317 \"\210\306\320\n\"\210\306\321\n\"\210\306\322\"\210\306\323\"\210\306\324\"\210\306\325\"\210\306\326\f\"\210\306\327\"\210\306\330 \"\210\306\331 \"\210\306\332 \"\210\306\333 \"\210\306\334 \"\207" [tramp-completion-function-alist-rsh tramp-completion-function-alist-ssh tramp-completion-function-alist-telnet tramp-completion-function-alist-su tramp-completion-function-alist-sg tramp-completion-function-alist-putty tramp-set-completion-function "rcp" "remcp" "scp" "scpx" "rsync" "rsh" "remsh" "ssh" "sshx" "telnet" "nc" "su" "sudo" "doas" "ksu" "sg" "krlogin" "plink" "plinkx" "pscp" "psftp" "fcp"] 3] custom-declare-variable tramp-remote-path funcall function #[0 "\300\207" [(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")] 1] "List of directories to search for executables on remote host.\nFor every remote host, this variable will be set buffer local,\nkeeping the list of existing directories on that host.\n\nYou can use `~' in this list, but when searching for a shell which groks\ntilde expansion, all directory names starting with `~' will be ignored.\n\n`Default Directories' represent the list of directories given by\nthe command \"getconf PATH\". It is recommended to use this\nentry on head of this list, because these are the default\ndirectories for POSIX compatible commands. On remote hosts which\ndo not offer the getconf command (like cygwin), the value\n\"/bin:/usr/bin\" is used instead. This entry is represented in\nthe list by the special value `tramp-default-remote-path'.\n\n`Private Directories' are the settings of the $PATH environment,\nas given in your `~/.profile'. This entry is represented in\nthe list by the special value `tramp-own-remote-path'." :group tramp :type (repeat (choice (const :tag "Default Directories" tramp-default-remote-path) (const :tag "Private Directories" tramp-own-remote-path) (string :tag "Directory"))) tramp-remote-process-environment #[0 "\300\207" [("ENV=''" "TMOUT=0" "LC_CTYPE=''" "CDPATH=" "HISTORY=" "MAIL=" "MAILCHECK=" "MAILPATH=" "PAGER=cat" "autocorrect=" "correct=")] 1] "List of environment variables to be set on the remote host.\n\nEach element should be a string of the form ENVVARNAME=VALUE. An\nentry ENVVARNAME= disables the corresponding environment variable,\nwhich might have been set in the init files like ~/.profile.\n\nSpecial handling is applied to some environment variables,\nwhich should not be set here:\n\nThe PATH environment variable should be set via `tramp-remote-path'.\n\nThe TERM environment variable should be set via `tramp-terminal-type'.\n\nThe INSIDE_EMACS environment variable will automatically be set\nbased on the Tramp and Emacs versions, and should not be set here." :version "26.1" (repeat string) tramp-sh-extra-args #[0 "\300\207" [(("/bash\\'" . "-noediting -norc -noprofile") ("/zsh\\'" . "-f +Z -V"))] 1] "Alist specifying extra arguments to pass to the remote shell.\nEntries are (REGEXP . ARGS) where REGEXP is a regular expression\nmatching the shell file name and ARGS is a string specifying the\narguments. These arguments shall disable line editing, see\n`tramp-open-shell'.\n\nThis variable is only used when Tramp needs to start up another shell\nfor tilde expansion. The extra arguments should typically prevent the\nshell from reading its init file." "27.1" (alist :key-type regexp :value-type string)] 10) #@473 List of pattern/action pairs. Whenever a pattern matches, the corresponding action is performed. Each item looks like (PATTERN ACTION). The PATTERN should be a symbol, a variable. The value of this variable gives the regular expression to search for. Note that the regexp must match at the end of the buffer, "\'" is implicitly appended to it. The ACTION should also be a symbol, but a function. When the corresponding PATTERN matches, the ACTION function is called. (defconst 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-antispoof-regexp tramp-action-confirm-message) (tramp-process-alive-regexp tramp-action-process-alive)) (#$ . 16596)) #@145 List of pattern/action pairs. This list is used for copying/renaming with out-of-band methods. See `tramp-actions-before-shell' for more info. (defconst 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)) (#$ . 17633)) #@219 Shell function to implement `uudecode' to standard output. Many systems support `uudecode -o /dev/stdout' or `uudecode -o -' for this or `uudecode -p', but some systems don't, and for them we have this shell function. (defconst tramp-uudecode "(echo begin 600 %t; tail -n +2) | uudecode\ncat %t\nrm -f %t" (#$ . 18066)) #@230 Perl script to produce output suitable for use with `file-truename' on the remote file system. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. (defconst 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 || -l $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" (#$ . 18393)) #@244 Perl script to produce output suitable for use with `file-name-all-completions' on the remote file system. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-perl-file-name-all-completions "%s -e '\nopendir(d, $ARGV[0]) || die(\"$ARGV[0]: $!\\nfail\\n\");\n@files = readdir(d); closedir(d);\nforeach $f (@files) {\n if (-d \"$ARGV[0]/$f\") {\n print \"$f/\\n\";\n }\n else {\n print \"$f\\n\";\n }\n}\nprint \"ok\\n\"\n' \"$1\" 2>/dev/null" (#$ . 19638)) #@232 Perl script to produce output suitable for use with `file-attributes' on the remote file system. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. (defconst 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 %%u t %%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]\n);' \"$1\" \"$2\" 2>/dev/null" (#$ . 20203)) #@220 Perl script implementing `directory-files-and-attributes' as Lisp `read'able output. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. (defconst 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 %%u t %%u -1)\\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]);\n}\nprintf(\")\\n\");' \"$1\" \"$2\" 2>/dev/null" (#$ . 21373)) #@270 Perl program to use for encoding a file. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. This implementation requires the MIME::Base64 Perl module to be installed on the remote host. (defconst tramp-perl-encode-with-module "%s -MMIME::Base64 -0777 -ne 'print encode_base64($_)' 2>/dev/null" (#$ . 23025)) #@270 Perl program to use for decoding a file. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. This implementation requires the MIME::Base64 Perl module to be installed on the remote host. (defconst tramp-perl-decode-with-module "%s -MMIME::Base64 -0777 -ne 'print decode_base64($_)' 2>/dev/null" (#$ . 23423)) #@176 Perl program to use for encoding a file. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-perl-encode "%s -e '\n# This script contributed by Juanma Barranquero <lektu@terra.es>.\n# Copyright (C) 2002-2021 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\n # 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" (#$ . 23821)) #@176 Perl program to use for decoding a file. Escape sequence %s is replaced with name of Perl binary. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-perl-decode "%s -e '\n# This script contributed by Juanma Barranquero <lektu@terra.es>.\n# Copyright (C) 2002-2021 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" (#$ . 25116)) #@99 Perl program to use for encoding a file. Escape sequence %s is replaced with name of Perl binary. (defconst tramp-perl-pack "%s -e 'binmode STDIN; binmode STDOUT; print pack(q{u*}, join q{}, <>)'" (#$ . 26568)) #@99 Perl program to use for decoding a file. Escape sequence %s is replaced with name of Perl binary. (defconst tramp-perl-unpack "%s -e 'binmode STDIN; binmode STDOUT; print unpack(q{u*}, join q{}, <>)'" (#$ . 26785)) #@124 `hexdump' program to use for encoding a file. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-hexdump-encode "%h -v -e '16/1 \" %%02x\" \"\\n\"'" (#$ . 27007)) #@120 `awk' program to use for encoding a file. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-awk-encode "%a '\\\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}'" (#$ . 27219)) #@129 `hexdump' / `awk' pipe to use for encoding a file. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-hexdump-awk-encode (format "%s | %s" tramp-hexdump-encode tramp-awk-encode) (#$ . 28024)) #@119 `od' program to use for encoding a file. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-od-encode "%o -v -t x1 -A n" (#$ . 28265)) #@124 `od' / `awk' pipe to use for encoding a file. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-od-awk-encode (format "%s | %s" tramp-od-encode tramp-awk-encode) (#$ . 28449)) #@118 Awk program to use for decoding a file. This string is passed to `format', so percent characters need to be doubled. (defconst tramp-awk-decode "%a '\\\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}'" (#$ . 28675)) #@251 Script to check existence of VC related files. It must be send formatted with two strings; the tests for file existence, and file readability. Input shall be read via here-document, otherwise the command could exceed maximum length of command line. (defconst tramp-vc-registered-read-file-names "echo \"(\"\nwhile read file; do\n quoted=`echo \"$file\" | sed -e \"s/\\\"/\\\\\\\\\\\\\\\\\\\"/\"`\n if %s \"$file\"; then\n echo \"(\\\"$quoted\\\" \\\"file-exists-p\\\" t)\"\n else\n echo \"(\\\"$quoted\\\" \\\"file-exists-p\\\" nil)\"\n fi\n if %s \"$file\"; then\n echo \"(\\\"$quoted\\\" \\\"file-readable-p\\\" t)\"\n else\n echo \"(\\\"$quoted\\\" \\\"file-readable-p\\\" nil)\"\n fi\ndone\necho \")\"" (#$ . 29324)) #@106 Alist of handler functions. Operations not mentioned here will be handled by the normal Emacs functions. (defconst tramp-sh-file-name-handler-alist '((access-file . tramp-handle-access-file) (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-uncache . tramp-handle-dired-uncache) (exec-path . tramp-sh-handle-exec-path) (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-case-insensitive-p . tramp-handle-file-name-case-insensitive-p) (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-system-info . tramp-sh-handle-file-system-info) (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) (load . tramp-handle-load) (make-auto-save-file-name . tramp-handle-make-auto-save-file-name) (make-directory . tramp-sh-handle-make-directory) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) (make-process . tramp-sh-handle-make-process) (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-handle-start-file-process) (substitute-in-file-name . tramp-handle-substitute-in-file-name) (temporary-file-directory . tramp-handle-temporary-file-directory) (tramp-set-file-uid-gid . tramp-sh-handle-set-file-uid-gid) (unhandled-file-name-directory . ignore) (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)) (#$ . 30074)) #@273 Like `make-symbolic-link' for Tramp files. If TARGET is a non-Tramp file, it is used verbatim as the target of the symlink. If TARGET is a Tramp file, only the localname component is used as the target of the symlink. (fn TARGET LINKNAME &optional OK-IF-ALREADY-EXISTS) (defalias 'tramp-sh-handle-make-symbolic-link #[770 "\306\307!!\204 \310\311E\"\207\312!\211\242>\204! \313\314\315D\"\210\211A@\242>\2042 \313\314\315D\"\210\3168\242>\204C \313\314\315D\"\210\3178\242>\204U \313\314\315D\"\210\3208\242>\204g \313\314\315D\"\210\3218\242>\204y \313\314\315D\"\210\3228\242>\204\215 \313\314\315 D\"\210\3238\324\306!\203\255 \325\312 !\"\203\255 \326\307\f!!\262)\306!\203\354 \311\327\211?\205\277 \n\211?\205\310 \n\330\331\332!\")\266\202\203\331 \202\341 \333!\331\332!Q)\266\202#\202@\334!\310\335C\"\204\347 \336\337\340\211\211 \341Y\205\211\203\314\211\341\342\343\344!@\345\216@@\346 \210)r@q\210\347 +C\3501\305 X\205\277\f\203b\317X\203b\351\352\353U\203H\354\202]\355U\203R\354\202]\316U\203\\\356\202]\357P#\210 \320Y\205\277\353\355U\203\237\3601\232r\361!\203\201\362!\202\205\363\364\"q\210\342P\262\365\347 C\"\211\262)0\202\236\210\202\237\210\361!\203\253\366\367\"\262)\242>\205\277\351\370\371\372\"P$0\266\205\202\210\340\266\205\202Ar\373\374!q\210p\375 \210A\340\211BC\324\211D\324EF\376 \210\377\201G !\210+\211@\346 \201H !\210)\266\202\262\210\211\204C\262\201I \262\203\323\355\201I \201J \211\201K N\351\201L #E!C\3501\316 X\205\310\f\203k\317X\203k\351\352\353U\203Q\354\202f\355U\203[\354\202f\316U\203e\356\202f\357P#\210 \320Y\205\310\353\355U\203\250\3601\243r\361!\203\212\362!\202\216\363\364\"q\210\342P\262\365\347 C\"\211\262)0\202\247\210\202\250\210\361!\203\264\366\367\"\262)\242>\205\310\351\370\371\372\"P$0\266\204\202\322\210\340\266\204\210\313\201M \351\201L #!C\"*\266\201N \f!\203\n\203 \n\247\203\374\201O \371\201P \"!\204\374 \201Q \340\211\211 \341Y\205\211\203\336\211\341\342\343\344!@\345\216@@\346 \210)r@q\210\347 +C\3501\327 X\205\321\f\203t\317X\203t\351\352\353U\203Z\354\202o\355U\203d\354\202o\316U\203n\356\202o\357P#\210 \320Y\205\321\353\355U\203\261\3601\254r\361!\203\223\362!\202\227\363\364\"q\210\342P\262\365\347 C\"\211\262)0\202\260\210\202\261\210\361!\203\275\366\367\"\262)\242>\205\321\351\370\371\372\"P$0\266\205\202\210\340\266\205\202Ar\373\374!q\210p\375 \210A\340\211BC\324\211D\324EF\376 \210\377\201G !\210+\211@\346 \201H !\210)\266\202\262\210\211\204$C\262\201I \262\203\345\355\201I \201J \211\201K N\351\201L #E!C\3501\340 X\205\332\f\203}\317X\203}\351\352\353U\203c\354\202x\355U\203m\354\202x\316U\203w\356\202x\357P#\210 \320Y\205\332\353\355U\203\272\3601\265r\361!\203\234\362!\202\240\363\364\"q\210\342P\262\365\347 C\"\211\262)0\202\271\210\202\272\210\361!\203\306\366\367\"\262)\242>\205\332\351\370\371\372\"P$0\266\204\202\344\210\340\266\204\210\313\201M \351\201L #!C\"*\266\202\201R \f!\210\201S \n\"\210\201T \n\371\201U \201V !\"\"\205>\201T \n\371\201W \201V !\201V \201X \201Y \f!P!$\"\266\202\207" [cl-struct-tramp-file-name-tags non-essential file-name-handler-alist signal-hook-function tramp-message-show-message tramp-verbose tramp-tramp-file-p expand-file-name tramp-run-real-handler make-symbolic-link tramp-dissect-file-name signal wrong-type-argument tramp-file-name 2 3 4 5 6 7 t tramp-file-name-equal-p tramp-file-local-name top string-prefix-p "/:" file-local-name file-remote-p tramp-get-remote-ln file-name-directory file-error "Making a symbolic link. ln(1) does not exist on the remote host." nil 10 "\n%s" generate-new-buffer " *string-output*" #[0 "\301!\207" [standard-output kill-buffer] 2] backtrace buffer-string (error) apply message 0 "" 1 "Warning: " "Tramp: " (error) processp process-buffer tramp-get-connection-buffer dont-create append process-get vector tramp-debug-message format "(%d) # " get-buffer-create "*debug tramp*" kill-all-local-variables erase-buffer run-hooks standard-output default-directory buffer-read-only buffer-file-name buffer-undo-list inhibit-modification-hooks inhibit-read-only temp-buffer-setup-hook internal-temp-output-buffer-show "%s" error-message-string error-message format-message substring-no-properties file-exists-p yes-or-no-p "File %s already exists; make it a link anyway? " file-already-exists delete-file tramp-flush-file-properties tramp-send-command-and-check "cd %s" tramp-shell-quote-argument "%s -sf %s %s" "./" file-name-nondirectory] 28 (#$ . 33906)]) #@54 Like `file-truename' for Tramp files. (fn FILENAME) (defalias 'tramp-sh-handle-file-truename #[257 "\306!\203\n \307\202 \310\311\211?\205 \312\313\314!\")\266\202\203$ \315\202% \310\316\317!\311\211?\2050 \314!\211\211?\205<