[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Pipe bash file contents to shell
From: |
giorgos |
Subject: |
Re: Pipe bash file contents to shell |
Date: |
Wed, 28 Mar 2012 19:18:08 -0000 |
User-agent: |
G2/1.0 |
I managed to create a lisp function which is very close to what I
want:
(defun pipe-region-to-shell ()
(interactive)
(append-to-buffer (get-buffer-create "*shell*") (region-beginning)
(region-end))
)
The function yanks the region to the shell buffer, which is exactly
what I want. Unfortunately, the bash commands in the region are not
executed, unless I go the shell buffer and press Enter.
I tried adding
(set-buffer "*shell*")
(newline)
but it only moves the point down one line, instead of actually
executing the command. Any suggestions?
- Re: Pipe bash file contents to shell,
giorgos <=