Skip to content

Instantly share code, notes, and snippets.

Created February 13, 2017 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/78faa02b66c7da10613011dda8d75a29 to your computer and use it in GitHub Desktop.
Save anonymous/78faa02b66c7da10613011dda8d75a29 to your computer and use it in GitHub Desktop.
Pretty print emacs s expressions from the command line
#!/bin/bash
set -o errexit
set -o nounset
set -o pipefail
if [ "$#" != "1" ]; then
echo "Needs precisely one argument" 2>&1
exit 1
fi;
emacs -q --batch --eval \
$'(progn (package-initialize) (require \'f) (message (pp (read (f-read (car command-line-args-left))))))' "$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment