Prechádzať zdrojové kódy

rewrote file printing script

Samuel W. Flint 8 rokov pred
rodič
commit
983c1b1bdc
1 zmenil súbory, kde vykonal 12 pridanie a 3 odobranie
  1. 12 3
      lptf

+ 12 - 3
lptf

@@ -1,6 +1,15 @@
 #!/bin/zsh
 # printout-script, my-init.org
-emacs -q -nw --load "~/.emacs.d/general-print-file.el" \
-      --exec "(print-file-proper \"$1\")" \
-      --exec "(kill-emacs)"
+[ $# -eq 0 ] && { echo "Usage $0: file1 file2 ... fileN" ; exit 1; }
+
+for file in $*
+do
+    [ -f $file ] \
+        && emacs -q -Q --no-init -nw \
+                 -l "~/.emacs.d/general-print-file.el" \
+                 --file $file \
+                 --eval "(ps-print-buffer-with-faces)" \
+                 --eval "(kill-emacs)" \
+            || echo "File does not exist: $file"
+done
 # printout-script ends here