определить псевдонимы для команды оболочки? - PullRequest
2 голосов
/ 05 сентября 2010

Есть ли способ определить псевдонимы, чтобы shell-command мог их распознать? shell распознает те, которые определены в .emacs.d / init_bash.sh; можно ли shell-command знать об этом тоже?

1 Ответ

2 голосов
/ 06 сентября 2010

Считать simple.el в shell-command код:

    ;; We do not use -f for csh; we will not support broken use of
    ;; .cshrcs.  Even the BSD csh manual says to use
    ;; "if ($?prompt) exit" before things which are not useful
    ;; non-interactively.  Besides, if someone wants their other
    ;; aliases for shell commands then they can still have them.
    (call-process shell-file-name nil
          (if error-file
              (list t error-file)
            t)
          nil shell-command-switch command)

nil после shell-file-name указывает, что emacs не отправляет входной файл процессу.Таким образом, вы должны проверить значение shell-file-name, чтобы определить, является ли это процесс, который читает неявные файлы .rc.

...