]> git.donarmstrong.com Git - zsh.git/blobdiff - .zsh/zshrc/30_aliases
add pdfextract function
[zsh.git] / .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