]> git.donarmstrong.com Git - zsh.git/commitdiff
Merge remote-tracking branch 'madduck/master'
authorDon Armstrong <don@donarmstrong.com>
Sun, 21 Sep 2014 22:20:08 +0000 (15:20 -0700)
committerDon Armstrong <don@donarmstrong.com>
Sun, 21 Sep 2014 22:20:08 +0000 (15:20 -0700)
Conflicts:
.zsh/zshrc/30_aliases
.zsh/zshrc/79_bindkeys

1  2 
.zsh/zshrc/30_aliases
.zsh/zshrc/60_vcsprompt
.zsh/zshrc/79_bindkeys
.zsh/zshrc/85_prompt

index fa973784e0b045ec92f79f2e86cd20f3238c9fee,7d48c0a6aa50d0537705c71cd5754886ab146ee7..522fd4ad021e2f60a894d6c4089f309cc394b4ff
@@@ -197,4 -198,52 +199,44 @@@ compdef asc=ss
  
  alias mdtest='swaks -s localhost -t'
  
 -if whence devtodo >/dev/null; then
 -  _devtodo_on_chpwd() {
 -    local out; out="$(devtodo)"
 -    [[ -n $out ]] && print "todo:\n$out"
 -  }
 -  [[ -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
+ gittestfile() {
+   local annex; annex=false
+   local file
+   case "$1" in
+     (-a) annex=true;;
+     (*)
+       if [ -n "$file" ]; then
+         echo >&2 "E: filename already given"
+         return 1
+       fi
+       file="$1";;
+   esac
+   if [ -z "$file" ]; then
+     file=$(TMPDIR=${PWD} tempfile -ptest. -s.txt)
+   fi
+   echo "Test file created $(date)" >| $file
+   case "$annex" in
+     true)
+       git annex add $file
+       git commit -m"Add test file $file to annex"
+       ;;
+     false)
+       git add $file
+       git commit -m"Add test file $file"
+       ;;
+   esac
+ }
  # vim:ft=zsh
Simple merge
index 803db91df1532a420af328155d9415c1c8312173,02844002d3654db33c8b10407e95512785de3ed8..e3d3b3a7316ccc29ac9a764b39456b964b381d55
@@@ -21,21 -20,8 +21,24 @@@ bindkey '\e=' copy-prev-shell-wor
  # allow for better ad-hoc multiline editing
  bindkey '\eq' push-line-or-edit
  
 +# fixup ctrl-arrow stuff since it's all mucked up since zsh doesn't use readline
 +bindkey "\e[1~" beginning-of-line
 +bindkey "\e[4~" end-of-line
 +bindkey "\e[5~" history-beginning-search-backward
 +bindkey "\e[6~" history-beginning-search-forward
 +bindkey "\e[3~" delete-char
 +bindkey "\e[2~" quoted-insert
 +bindkey "\e[5C" forward-word
 +bindkey "\e[5D" backward-word
 +bindkey "\e[1;5C" forward-word
 +bindkey "\e[1;5D" backward-word
 +
 +# for rxvt
 +bindkey "\e[8~" end-of-line
 +bindkey "\eOc" forward-word
 +bindkey "\eOd" backward-word
+ # fix home/end keys (for mosh)
+ bindkey "\e[7~" beginning-of-line
+ bindkey "\e[8~" end-of-line
  
  # vim:ft=zsh
Simple merge