Skip to main content


Je :emacs: Imakso, mirinde utilas shell-command-on-region (M-| ), per kiu oni metas tekston kiel enigo al programo.

Mi ĵus malkovris hodiaŭ la egale utilan sh-execute-region, kiu rulas liniojn kiel ŝelprogramo! Mi agordis ĝin hodiaŭ al C-c |. :gutkato_ridas:

:terminalo: Tiuanime, hodiaŭ mi skribis simplan funkcion, execute-buffer. Se vi redaktas skripton, per ĝi povas simple ruli la nunan dosieron kaj vidi la eligon. Tre utilas por ŝelo kaj bc-umado, ktp, kiel mi ofte faras. :gutkato_dikfingro_supren:

(global-set-key (kbd "C-c \\") 'execute-buffer)
(defun execute-buffer ()
  "Execute the current buffer’s file, sending output to a buffer."
  (interactive)
  (shell-command (format "\"%s\"" (buffer-file-name))))

#lang_eo #imakso #emacs #ŝelo #bash #gnu #linukso #lignukso
This entry was edited (1 week ago)

This website uses cookies. If you continue browsing this website, you agree to the usage of cookies.