Edit file with Emacs.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Wed, 05 Sep 2012 11:51:46 +0300
changeset 543 77f7344600cb
parent 542 5674fac0249d
child 544 ee6112ed88da
Edit file with Emacs.
Makefile
--- a/Makefile	Tue Sep 04 17:26:50 2012 +0300
+++ b/Makefile	Wed Sep 05 11:51:46 2012 +0300
@@ -115,6 +115,11 @@
 		mkdir -p $(HOME)/.config/mc $(HOME)/.local/share/mc/; \
 		install -m 640 .local/share/mc/bashrc $(HOME)/.local/share/mc/; \
 		cat .config/mc/mc.ext /etc/mc/mc.ext > $(HOME)/.config/mc/mc.ext; \
+		{ \
+			echo 'default/*'; \
+			echo '    Open=file %f'; \
+			echo '    Edit=[ `du -m %f | { read size rest; echo $$size; }` -le 4 ] && e %f || echo Too large file for Emacs...'; \
+		} >>$(HOME)/.config/mc/mc.ext; \
 	else \
 		mkdir -p $(HOME)/.mc; \
 		install -m 640 .local/share/mc/bashrc $(HOME)/.mc; \