Emacs – 如何修补文件 – Eshell 不支持输入重定向

Emacs – 如何修补文件 – Eshell 不支持输入重定向

当尝试从 Eshell 缓冲区(例如patch nsfns.m < nsfns.diff)运行补丁时,我收到一条错误消息(如下所示)。有没有办法使用 Eshell 缓冲区应用补丁?如果没有,是否有另一种允许应用补丁的终端类型仿真主模式?

Debugger entered--Lisp error: (error "Eshell does not support input redirection")
  signal(error ("Eshell does not support input redirection"))
  error("Eshell does not support input redirection")
  eshell-parse-redirection()
  run-hook-with-args-until-success(eshell-parse-redirection)
  #[0 "m?\205-�\302\303!\206�\304\305f!\305u\210\204�\211\202)� \204$�C\306C\244\210\210\202��\207" [eshell-current-argument eshell-arg-listified run-hook-with-args-until-success eshell-parse-argument-hook char-to-string nil t] 3 "\n\n(fn)"]()
  funcall(#[0 "m?\205-�\302\303!\206�\304\305f!\305u\210\204�\211\202)� \204$�C\306C\244\210\210\202��\207" [eshell-current-argument eshell-arg-listified run-hook-with-args-until-success eshell-parse-argument-hook char-to-string nil t] 3 "\n\n(fn)"])
  eshell-parse-argument()
  #[0 "m?\205#�`\301 `U\203�\302\303d{\"\210\211\203�\300C\244\210\266\202��\207" [(t "patch" "nsfns.m") eshell-parse-argument error "Failed to parse argument '%s'"] 6 "\n\n(fn)"]()
  funcall(#[0 "m?\205#�`\301 `U\203�\302\303d{\"\210\211\203�\300C\244\210\266\202��\207" [(t "patch" "nsfns.m") eshell-parse-argument error "Failed to parse argument '%s'"] 6 "\n\n(fn)"])
  eshell-parse-arguments(#<marker at 90 in *eshell*> 116)
  #[0 "\303\302\304\301\300\"\240\210\207" [116 #<marker at 90 in *eshell*> (nil) nil eshell-parse-arguments] 5 "\n\n(fn)"]()
  funcall(#[0 "\303\302\304\301\300\"\240\210\207" [116 #<marker at 90 in *eshell*> (nil) nil eshell-parse-arguments] 5 "\n\n(fn)"])
  eshell-hist-parse-arguments(#<marker at 90 in *eshell*> 116)
  eshell-expand-history-references(#<marker at 90 in *eshell*> 116)
  run-hook-with-args(eshell-expand-history-references #<marker at 90 in *eshell*> 116)
  #[0 "\300\304 `S\"\240\210\305\306    `S#\210\307 `S\"\211\205?�\310  !\210\300\304\nS\"\240\210\311\312!\210\313\314\315\316\317\320\321\300\"\322\"\323\324%D\215\205?�\325 \207" [("patch nsfns.m < nsfns.diff") eshell-last-output-end eshell-last-input-start eshell-last-input-end buffer-substring-no-properties run-hook-with-args eshell-expand-input-functions eshell-parse-command-input eshell-update-markers run-hooks eshell-input-filter-functions eshell-terminal funcall make-byte-code 0 "\302\303\301!\203\f�\304\301!\210\207\305\301\300\242\"\210\207" vconcat vector [nil eshell-invoke-directly eval eshell-eval-command] 4 "\n\n(fn)" eshell-life-is-too-much] 10 "\n\n(fn)"]()
  funcall(#[0 "\300\304 `S\"\240\210\305\306    `S#\210\307 `S\"\211\205?�\310  !\210\300\304\nS\"\240\210\311\312!\210\313\314\315\316\317\320\321\300\"\322\"\323\324%D\215\205?�\325 \207" [("patch nsfns.m < nsfns.diff") eshell-last-output-end eshell-last-input-start eshell-last-input-end buffer-substring-no-properties run-hook-with-args eshell-expand-input-functions eshell-parse-command-input eshell-update-markers run-hooks eshell-input-filter-functions eshell-terminal funcall make-byte-code 0 "\302\303\301!\203\f�\304\301!\210\207\305\301\300\242\"\210\207" vconcat vector [nil eshell-invoke-directly eval eshell-eval-command] 4 "\n\n(fn)" eshell-life-is-too-much] 10 "\n\n(fn)"])
  eshell-send-input(nil)
  funcall-interactively(eshell-send-input nil)
  call-interactively(eshell-send-input nil nil)
  command-execute(eshell-send-input)

答案1

您可以使用 来解决这个问题cat nsfns.diff | patch nsfns.m

相关内容