]> git.donarmstrong.com Git - zsh.git/commitdiff
add pdfextract function
authormartin f. krafft <madduck@madduck.net>
Mon, 7 Apr 2014 11:12:57 +0000 (13:12 +0200)
committermartin f. krafft <madduck@madduck.net>
Mon, 7 Apr 2014 11:13:28 +0000 (13:13 +0200)
.zsh/zshrc/30_aliases

index 8e4ff53cd812237473e5911d665cdfab5035e404..7ae129991bf02b1f6247e97f81d0e9005f50e0f2 100644 (file)
@@ -206,4 +206,11 @@ if whence devtodo >/dev/null; then
   [[ -z ${(M)chpwd_functions:#_devtodo_on_chpwd} ]] && chpwd_functions+=_devtodo_on_chpwd
 fi
 
+pdfextract() {
+  local i=$1
+  local o=$2
+  shift 2
+  pdftk "$i" cat "${@:-1-end}" output "${o%.pdf}.pdf"
+}
+compdef _files pdfextract
 # vim:ft=zsh