chiark / gitweb /
Merge branch 'master' into fairchild fairchild
authorMark Wooding <mdw@distorted.org.uk>
Wed, 30 May 2018 14:56:12 +0000 (15:56 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Wed, 30 May 2018 14:56:12 +0000 (15:56 +0100)
* master: (21 commits)
  dot/ipython-key-bindings.py: Fix because IPython is now (fr)agile.
  dot/zshrc: Fix path ellipsization in the prompt.
  dot/emacs-calc: Add peta- and exa- prefixes for bits and bytes.
  el/dot-emacs.el: Add a useful `w3m' binding to open links in new tabs.
  dot/gitconfig.in: Don't have `git send-email' try to do threading.
  dot/gitconfig.in: Abolish the `git email' alias.
  dot/gitconfig.in: Remove output filename; force full indices.
  git/gitignore: Ignore toplevel `p/' and `p.*/' directories.
  git/gitignore: Only ignore `build' etc. if they're toplevel directories.
  git/gitignore: Deprecate `deb-build/' and `build-*/' directories.
  dot/gitconfig.in: Configure `format-patch' to do sensible things.
  el/dot-emacs.el: Override git's use of a pager more vigorously.
  dot/zshrc: Don't have `typeset -x' implicitly make variables global.
  el/dot-emacs.el: Suppress `/dev/null' filename when running `git grep'.
  dot/zshrc: Recognize the keypad keys.
  dot/zshrc: Commentary for running `~/.zshrc-local'.
  dot/zshrc: Interpret `**' to cover files too, where sensible.
  dot/zshrc: Include parser content in the second-level prompt.
  dot/shell-rc: Add a hook for shell-specific `PS2' customization.
  dot/shell-rc: Don't expand `TERM' or `INSIDE_EMACS' if they're not defined.
  ...

dot/bashrc
dot/emacs-calc
dot/gitconfig.in
dot/ipython-key-bindings.py
dot/shell-rc
dot/zshrc
el/dot-emacs.el
git/gitignore

index f774607efafd83a70bdb66608d4121d6aad9879f..5f9742a0eb1ea76b407ef24d38da5618f054ad27 100644 (file)
@@ -72,7 +72,7 @@ shopt -s extglob
 if (( ${BASH_VERSINFO[0]} >= 4 )); then shopt -s globstar; fi
 shopt -s gnu_errfmt
 shopt -s histappend
-shopt -s histexpand
+set -o histexpand
 shopt -s histreedit
 shopt -u histverify
 shopt -s hostcomplete
index 017f00b6afd728e66c1a63c4a984817f6e0e4354..ea44b59920da852611417612af346a4ecd0f92f5 100644 (file)
@@ -78,6 +78,8 @@ constant bounds."
 
 ;;; Custom units stored by Calc on Thu Mar 18 19:02:50 1999
 (setq math-additional-units '(
+  (EB "1024 * PB" "Exabyte")
+  (PB "1024 * TB" "Petabyte")
   (TB "1024 * GB" "Terabyte")
   (gig "GB" "Gigabyte")
   (GB "1024 * MB" "Gigabyte")
@@ -85,6 +87,8 @@ constant bounds."
   (MB "1024 * kB" "Megabyte")
   (KB "kB" "Kilobyte")
   (kB "1024 * byte" "Kilobyte")
+  (Eb "1024 * Pb" "Exabit")
+  (Pb "1024 * Tb" "Petabit")
   (Tb "1024 * Gb" "Teraabit")
   (Gb "1024 * Mb" "Gigabit")
   (Mb "1024 * kb" "Megabit")
index 9b9617767963eabe1f59cc96f03a9f7c1d8e8f9c..369c091acc051e50501d4bb27a6b227e25a744d0 100644 (file)
@@ -46,6 +46,9 @@
 
 [format]
        headers = "Organization: Straylight/Edgeware\n"
+       coverletter = auto
+       thread = shallow
+       signature = "[mdw]"
 
 [color]
        ui = auto
@@ -85,7 +88,7 @@
 
 [alias]
        egrep = "grep -E"
-       patch = "format-patch -o p -s"
+       patches = "format-patch --full-index"
        graph = "log --pretty=oneline --abbrev-commit --graph"
        release = !"sh -e -c ' \
                [ $# -gt 0 ] || { \
        amend = !"env EDITOR=true VISUAL=true git commit --amend -a"
        spaces = !"sh -e -c 'git ls-files -z \"$@\"| \
                xargs -0r space -cv' spaces"
-       mailto = "send-email \
-                       --quiet \
-                       --no-chain-reply-to \
-                       --no-signed-off-by-cc \
-                       --to"
        files = "ls-files --exclude-standard"
        unstg = !"sh -e -c ' \
                : ${GIT_DIR=$(git rev-parse --git-dir)}; \
        aliasesfile = @profile@/dot/mailrc
        aliasfiletype = mailrc
        chainreplyto = no
+       thread = no
        signedoffbycc = yes
        suppresscc = self
 
index 3f392fe4498d6418b1782c99c02fa89d48e2cd53..abb1b01befa5e37e0ec706be9391eb7bffcd4a43 100644 (file)
@@ -15,7 +15,8 @@ try: pt = ipy.pt_cli
 except AttributeError: pass
 else:
   reg = pt.application.key_bindings_registry
-  bind = PTK.key_binding.bindings.utils.create_handle_decorator(reg)
+  try: bind = reg.add_binding
+  except AttributeError: bind = PTK.key_binding.bindings.utils.create_handle_decorator(reg)
 
   def inhibit_history_search(buf, fn):
     searchp, searchtext = buf.enable_history_search, buf.history_search_text
index 4ab03557bc5c1ca8c8079f7505b35325c81ddad2..55934d589b90861a6855ebf82a1ae3f0bb1377f3 100644 (file)
@@ -25,8 +25,8 @@ __mdw_set_prompt_pieces () {
 
   ## Fancy highlighting in some terminals.
   local bold unbold nl gitcolour rccolour uncolour
-  local host dir
-  bold="" unbold="" nl="" gitcolour="" rccolour="" uncolour=""
+  local host dir more
+  bold="" unbold="" nl="" gitcolour="" rccolour="" uncolour="" more=""
   __mdw_set_prompt_hacks
 
   ## Choose the right delimiters.  Highlight root prompts specially;
@@ -71,10 +71,11 @@ __mdw_set_prompt_pieces () {
   __mdw_prompt_rc_left="$unbold$rccolour"
   __mdw_prompt_rc_right="$uncolour$bold"
   __mdw_prompt_right="$right$unbold"
+  __mdw_prompt_more=" $more$bold>$unbold "
 }
 
 __mdw_set_prompt () {
-  case "$TERM:$INSIDE_EMACS" in
+  case "${TERM-dumb}:${INSIDE_EMACS+$INSIDE_EMACS}" in
     dumb:)
       case $(id -u) in 0) PS1='# ' ;; *) PS1='$ ' ;; esac
       PS2='> '
@@ -92,7 +93,7 @@ __mdw_set_prompt () {
        *) rc="$__mdw_prompt_rc_left rc=$__mdw_last_rc$__mdw_prompt_rc_right" ;;
       esac
       PS1="$__mdw_prompt_left$git$rc$__mdw_prompt_right"
-      PS2="$PS1 $bold>$unbold "
+      PS2="$PS1$__mdw_prompt_more"
       unset __mdw_last_rc
       ;;
   esac
index 3cf00dc492eb8e47c3b8d4900baeb77841f2d153..bf32bf93e2f5a36ecee012a22ff3af385084204f 100644 (file)
--- a/dot/zshrc
+++ b/dot/zshrc
@@ -17,7 +17,8 @@ __mdw_set_prompt_hacks () {
       gitcolour=%F{cyan} rccolour=%F{red} uncolour=%f
       ;;
   esac
-  host=%m dir=" %(6~!%-1~/.../%5~!%~)"
+  host=%m dir=" %(6~!%-1~/.../%4~!%~)"
+  more=%F{green}%_%f
 }
 
 if [ -t 0 ]; then
@@ -66,6 +67,20 @@ bindkey "\e^l" down-case-word-shell
 bindkey "\ec" capitalize-word-bash
 bindkey "\e^c" capitalize-word-shell
 
+bindkey "\e[1~" beginning-of-line "\e[4~" end-of-line
+
+bindkey -s           "\eOQ" "/" "\eOR" "*" "\eOS" "-"
+bindkey -s "\eOw" "7" "\eOx" "8" "\eOy" "9"
+bindkey -s "\eOt" "4" "\eOu" "5" "\eOv" "6" "\eOk" "+"
+bindkey -s "\eOq" "1" "\eOr" "2" "\eOs" "3"
+bindkey -s "\eOp" "0"           "\eOn" "."; bindkey "\eOM" accept-line
+
+bindkey -s           "\eOQ" "/" "\eOR" "*" "\eOS" "-"
+bindkey -s "\eOw" "7" "\eOx" "8" "\eOy" "9"
+bindkey -s "\eOt" "4" "\eOu" "5" "\eOv" "6" "\eOk" "+"
+bindkey -s "\eOq" "1" "\eOr" "2" "\eOs" "3"
+bindkey -s "\eOp" "0"           "\eOn" "."; bindkey "\eOM" accept-line
+
 bindkey "\ep" history-beginning-search-backward
 bindkey "\en" history-beginning-search-forward
 
@@ -122,6 +137,8 @@ unsetopt bash_auto_list
 unsetopt beep
 setopt extendedglob
 unsetopt flow_control
+unsetopt global_export
+setopt glob_star_short
 setopt hist_ignore_all_dups
 setopt hist_ignore_space
 setopt ksh_glob
@@ -137,6 +154,7 @@ setopt share_history
 ###--------------------------------------------------------------------------
 ### Finishing touches.
 
+## Local tweaks.
 __mdw_source_if_exists "$HOME/.zshrc-local"
 
 ###----- That's all, folks --------------------------------------------------
index 24d076d2e05477c4c1fb5ccd08e9eaf33fa20a6e..001fa2947f96129ee1ec14f238fa220b015ae338 100644 (file)
@@ -1012,6 +1012,9 @@ (defun mdw-w3m-browse-url (url &optional new-session-p)
            (w3m-browse-url url new-session-p))
        (select-window window)))))
 
+(eval-after-load 'w3m
+  '(define-key w3m-mode-map [?\e ?\r] 'w3m-view-this-url-new-session))
+
 (defvar mdw-good-url-browsers
   '(browse-url-chromium
     browse-url-mozilla
@@ -4006,7 +4009,7 @@ (defun ssh (host)
   (ansi-term (list "ssh" host) (format "ssh@%s" host)))
 
 (defvar git-grep-command
-  "env PAGER=cat git grep --no-color -nH -e "
+  "env GIT_PAGER=cat git grep --no-color -nH -e "
   "*The default command for \\[git-grep].")
 
 (defvar git-grep-history nil)
@@ -4016,7 +4019,8 @@ (defun git-grep (command-args)
   (interactive
    (list (read-shell-command "Run git grep (like this): "
                             git-grep-command 'git-grep-history)))
-  (grep command-args))
+  (let ((grep-use-null-device nil))
+    (grep command-args)))
 
 ;;;--------------------------------------------------------------------------
 ;;; Magit configuration.
index b41e9346f4ab195bf3e72bffa4da7e8421d3e171..e25ff118f2d49c12f519692bd1f38e98f87e5711 100644 (file)
@@ -23,8 +23,8 @@ GTAGS
 .gdb_history
 
 ## Build and release directories.
-build
-build-*
-build.*
-dist-*
-deb-build
+/build/
+/build.*/
+/dist-*/
+/p/
+/p.*/