%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/org/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/org/ob-shell.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.

;;; This file does not contain utf-8 non-ASCII characters,
;;; and so can be loaded in Emacs versions earlier than 23.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\207" [require ob org-macs shell cl-lib] 2)
(defvar org-babel-default-header-args:shell nil)
#@164 Define execution functions associated to shell names.
This function has to be called whenever `org-babel-shell-names'
is modified outside the Customize interface.
(defalias 'org-babel-shell-initialize #[0 "\211\205F\211@\301\302\303\304P!\305\306\307\"\310\311DC\312BB\257!\210\301\313\314\303\315P!D\316\306\317\"F!\210\301\320\303\321P!\322BB!\210A\266\202\202\207" [org-babel-shell-names eval defun intern "org-babel-execute:" (body params) format "Execute a block of %s commands with Babel." let shell-file-name ((org-babel-execute:shell body params)) defalias quote "org-babel-variable-assignments:" 'org-babel-variable-assignments:shell "Return list of %s statements assigning to the block's variables." defvar "org-babel-default-header-args:" ('nil)] 10 (#$ . 562) nil])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313&	\210\300\314\302\303\315DD\316\306\307\310\317\320\321&	\207" [custom-declare-variable org-babel-shell-names funcall function #[0 "\300\207" [("sh" "bash" "zsh" "fish" "csh" "ash" "dash" "ksh" "mksh" "posh")] 1] "List of names of shell supported by babel shell code blocks.\nCall `org-babel-shell-initialize' when modifying this variable\noutside the Customize interface." :group org-babel :type (repeat (string :tag "Shell name: ")) :set #[514 "\300\"\210\301 \207" [set-default org-babel-shell-initialize] 5 "\n\n(fn SYMBOL VALUE)"] org-babel-shell-results-defaults-to-output #[0 "\300\207" [t] 1] "Let shell execution defaults to \":results output\".\n\nWhen set to t, use \":results output\" when no :results setting\nis set.  This is especially useful for inline source blocks.\n\nWhen set to nil, stick to the convention of using :results value\nas the default setting when no :results is set, the \"value\" of\na shell execution being its exit code." boolean :package-version (Org . "9.4")] 10)
#@123 Execute a block of Shell commands with Babel.
This function is called by `org-babel-execute-src-block'.

(fn BODY PARAMS)
(defalias 'org-babel-execute:shell #[514 "\301\302\236A!\303\236A\211\205\304\305!!\262\306\236A\211\307\232\203$?\206'\310\235\311\236A\312\313	!#\205:\314P\315\316\n	%\317\320\n\236A\321\236A\"\317\322\236A\323\f\236A\"#\207" [org-babel-shell-results-defaults-to-output org-babel-sh-initiate-session :session :stdin org-babel-sh-var-to-string org-babel-ref-resolve :result-params ("replace") "value" :cmdline org-babel-expand-body:generic org-babel-variable-assignments:shell "\necho $?" org-babel-reassemble-table org-babel-sh-evaluate org-babel-pick-name :colname-names :colnames :rowname-names :rownames] 15 (#$ . 2430)])
#@93 Prepare SESSION according to the header arguments specified in PARAMS.

(fn SESSION PARAMS)
(defalias 'org-babel-prep-session:shell #[514 "\301!\302!\303!\204\304\305\"\210\306 \307\310\311\312\313!\314\"\315$\216rq\210\212\316\317\307\320\321\312\313!\322\"\323\324%\"\210,\210\207" [comint-input-filter org-babel-sh-initiate-session org-babel-variable-assignments:shell org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data make-byte-code 0 "\301\300\302\"\207" vconcat vector [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] mapc 257 "\211c\210\301\302\303\"\210\304\300!\207" [comint-send-input nil t org-babel-comint-wait-for-output] 4 "\n\n(fn VAR)"] 12 (#$ . 3217)])
#@51 Load BODY into SESSION.

(fn SESSION BODY PARAMS)
(defalias 'org-babel-load-session:shell #[771 "\300 \301\302\303\304\305!\306\"\307$\216\310\"r\211q\210\311\312p!!b\210\313!c\210)\211\262)\207" [current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 org-babel-prep-session:shell process-mark get-buffer-process org-babel-chomp] 10 (#$ . 3971)])
#@114 Return a list of statements declaring the values as a generic variable.

(fn VARNAME VALUES &optional SEP HLINE)
(defalias 'org-babel--variable-assignments:sh-generic #[1026 "\300\301\302##\207" [format "%s=%s" org-babel-sh-var-to-sh] 11 (#$ . 4381)])
#@108 Return a list of statements declaring the values as a bash array.

(fn VARNAME VALUES &optional SEP HLINE)
(defalias 'org-babel--variable-assignments:bash_array #[1026 "\300\301\211\302\303\304\305\306\307\"\310\"\311\312%\313#$\207" [format "unset %s\ndeclare -a %s=( %s )" mapconcat make-byte-code 257 "\302\300\301#\207" vconcat vector [org-babel-sh-var-to-sh] 5 "\n\n(fn VALUE)" " "] 16 (#$ . 4647)])
#@118 Return a list of statements declaring the values as bash associative array.

(fn VARNAME VALUES &optional SEP HLINE)
(defalias 'org-babel--variable-assignments:bash_assoc #[1026 "\300\301\211\302\303\304\305\306\307
\f\f#\310\"\311\312%\313#$\207" [format "unset %s\ndeclare -A %s\n%s" mapconcat make-byte-code 257 "\303\304\300\305@\301\302#\305A\301\302#$\207" vconcat vector [format "%s[%s]=%s" org-babel-sh-var-to-sh] 9 "\n\n(fn ITEMS)" "\n"] 17 (#$ . 5067)])
#@99 Represent the parameters as useful Bash shell variables.

(fn VARNAME VALUES &optional SEP HLINE)
(defalias 'org-babel--variable-assignments:bash #[1026 ":\2036@\211:\203/\211A\211:\203 \300$\202*\301$\262\2025\301$\207\302$\207" [org-babel--variable-assignments:bash_assoc org-babel--variable-assignments:bash_array org-babel--variable-assignments:sh-generic] 11 (#$ . 5545)])
#@79 Return list of shell statements assigning the block's variables.

(fn PARAMS)
(defalias 'org-babel-variable-assignments:shell #[257 "\300\236A\301\236A\302\230\205\303\236A\206\304\305\306\307\310\311\312\"\313\"\314\315%\316!\"\207" [:separator :hlines "yes" :hline-string "hline" mapcar make-byte-code 257 "\303\304\n\"\203\305@A\300\301$\207\306@A\300\301$\207" vconcat vector [shell-file-name string-suffix-p "bash" org-babel--variable-assignments:bash org-babel--variable-assignments:sh-generic] 6 "\n\n(fn PAIR)" org-babel--get-vars] 11 (#$ . 5961)])
#@164 Convert an elisp value to a shell variable.
Convert an elisp var into a string of shell commands specifying a
var of the same value.

(fn VAR &optional SEP HLINE)
(defalias 'org-babel-sh-var-to-sh #[769 "\300\301\300\302\303##\300Q\207" ["'" replace-regexp-in-string "'\"'\"'" org-babel-sh-var-to-string] 11 (#$ . 6543)])
#@67 Convert an elisp value to a string.

(fn VAR &optional SEP HLINE)
(defalias 'org-babel-sh-var-to-string #[769 "\300<\203&@<\204@\301=\203&\302\303\206\304\305\306\257\"\2026<\2033\307\310#\2026\211!\207" [#[257 "\211;\203\207\300\301\"\207" [format "%S"] 4 "\n\n(fn V)"] hline orgtbl-to-generic :sep "	" :fmt :hline mapconcat "\n"] 12 (#$ . 6877)])
#@86 Initiate a session named SESSION according to PARAMS.

(fn &optional SESSION PARAMS)
(defalias 'org-babel-sh-initiate-session #[512 "\205.\301\230?\205.\302 \303\304\305\306\307!\310\"\311$\216\312!\206+\313!\210`\314\223\210\315p!)\262\207" [comint-last-output-start "none" current-window-configuration make-byte-code 0 "\301\300!\207" vconcat vector [set-window-configuration] 2 org-babel-comint-buffer-livep shell nil get-buffer] 9 (#$ . 7257)])
#@51 String to indicate that evaluation has completed.
(defvar org-babel-sh-eoe-indicator "echo 'org_babel_sh_eoe'" (#$ . 7722))
#@51 String to indicate that evaluation has completed.
(defvar org-babel-sh-eoe-output "org_babel_sh_eoe" (#$ . 7852))
#@268 Pass BODY to the Shell process in BUFFER.
If RESULT-TYPE equals `output' then return a list of the outputs
of the statements in BODY, if RESULT-TYPE equals `value' then
return the value of the last statement in BODY.

(fn SESSION BODY &optional PARAMS STDIN CMDLINE)
(defalias 'org-babel-sh-evaluate #[1282 "\306\236A\307\236A\211\310\232\203?\206\311\235\204\203\322\312\313!\312\314!\315\236A\316\230?\317\320!\321\322\323\324\325!\326\"\327$\216r\211q\210\203K\330\261\210\203R\330c\210c\210)r\211q\210\331\332\211\332\322%\210*\266\333\334\"\210\317\320!\321\322\323\324\325!\335\"\327$\216r\211q\210	\206\205\336c\210)r\211q\210\331\332\211\332\322%\210*\266\317\337!r\211q\210\321\322\323\324\325!\340\"\327$\216\341\203\264\202\272\342\343	#	\205\303\344\nPPp#\210\345 *\262\266\203\202d\203\356\346\347\350\351\352\353
!\204\351\354\355\"\210\356 \321\322\357\324\325!\360\"\361$\216r
q\210\212\362\336C\321\363\364\324\325!\365\"\366\367%B\332\370\371p!!b\210`d{\262|\266\372\373\332\374\2032\375\2023\376\336\374\377\336##\266\202\330\"\fC\"\211\203x\211@\211c\210\201B\332\201C\"\210\212
b\210\201D@\332\201C#)\204q\201E\371p!!\210\202TA\266\202\202B\210
b\210\212\201D\201FA!\332\201C#\205\230\201D@\332\201C#)\204\247\201E\371p!!\210\202y\370\371p!!b\210\211c\210\203\332\201G\374\330\201H\201F\206\307\336!#\242\"\203\332\201I\242\322\225\"\240\210\373\242@\")\266\202,\262\327\"\"\330#\202d\201J!\203H\312\313!\315\236A\316\232?\317\320!\321\322\323\324\325!\201K\"\327$\216r\211q\210\330\261\210\203$\330c\210\nc\210)r\211q\210\331\332\211\332\322%\210*\266\333\334\"\210\201L\336\"\266\202\202d\201L	\332\374\203X\375\202Y\376\336\374\377\336##\266\202\"\203v\201M\373\330\201C#!@\262\211\205\307\236A\211\201N\235?\205\201O\235\204\341\201P\235\204\341\201Q\235\204\341\201R\235\204\341\201S\235\204\341\201T\235\204\341\201U\235\204\331\201V\235\204\331\201W\235\204\331\201X\235\203\345\201Y\235\204\345\202\312\201Z!\211\317\320!\321\322\323\324\325!\201[\"\327$\216r\211q\210c\210)r\211q\210\331\332\211\332\322%\210*\266\201\\!\262\262\262\207" [org-babel-shell-results-defaults-to-output shell-file-name comint-input-filter comint-output-filter-functions org-babel-sh-eoe-indicator comint-last-input-end :shebang :result-params ("replace") "value" org-babel-temp-file "sh-script-" "sh-stdin-" :padline "no" generate-new-buffer " *temp file*" make-byte-code 0 "\301\300!\205	\302\300!\207" vconcat vector [buffer-name kill-buffer] 2 "\n" write-region nil set-file-modes 493 [buffer-name kill-buffer] "" " *temp*" [buffer-name kill-buffer] call-process-shell-command format "%s %s" " " buffer-string mapconcat org-babel-sh-strip-weird-long-prompt mapcar org-trim butlast org-babel-comint-buffer-livep error "Buffer %s does not exist or has no process" match-data "\301\300\302\"\207" [set-match-data evaporate] 3 #[257 "\300\207" [nil] 2 "\n\n(fn INPUT)"] 257 "\300\211\242P\240\207" [] 4 "\n\n(fn TEXT)" process-mark get-buffer-process append split-string replace-regexp-in-string "\\`\\([ 	]*\n\\)+" "\\`[ 	\n
]+" "[ 	\n
]+\\'" comint-prompt-regexp org-babel-sh-eoe-output comint-send-input t re-search-forward accept-process-output regexp-quote string-match "[
\n]+" substring org-string-nw-p [buffer-name kill-buffer] org-babel-eval reverse "none" "scalar" "verbatim" "html" "code" "pp" "file" "output" "raw" "org" "drawer" "table" "sh-" [buffer-name kill-buffer] org-babel-import-elisp-from-file] 27 (#$ . 7973)])
#@65 Remove prompt cruft from a string of shell output.

(fn STRING)
(defalias 'org-babel-sh-strip-weird-long-prompt #[257 "\300\301\"\203\302\303\225\"\262\202\207" [string-match "^% +[
\n$]+ *" substring 0] 4 (#$ . 11627)])
(provide 'ob-shell)

Zerion Mini Shell 1.0