]> git.madduck.net Git - etc/neomutt.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

replace identical files with symlinks main
authormartin f. krafft <madduck@madduck.net>
Thu, 23 May 2024 11:40:48 +0000 (13:40 +0200)
committermartin f. krafft <madduck@madduck.net>
Thu, 23 May 2024 11:40:48 +0000 (13:40 +0200)
.config/neomutt/append-header [changed from file to symlink]
.config/neomutt/bgview [changed from file to symlink]
.config/neomutt/bgview-delay [changed from file to symlink]
.config/neomutt/bgview-fifo [changed from file to symlink]
.config/neomutt/remove-header [changed from file to symlink]
.config/neomutt/replace-header [changed from file to symlink]
.config/neomutt/supersede-header [changed from file to symlink]

deleted file mode 100755 (executable)
index ab7444bb5eb7b68f98666dd381c0434d7877fb22..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# edit-header - helper script to append/replace/remove headers with mutt
-#
-# Based on an idea by David Champion <dgc at uchicago.edu>
-#
-# Copyright © 2008 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-set -eu
-
-if [ ! -x "$(command -v formail)" ]; then
-  echo E: formail not installed. >&2
-  exit 1
-fi
-
-header="${1:-}"
-if [ -z "$header" ]; then
-  echo "E: no header specified" >&2
-  exit 1
-fi
-
-get_header_contents()
-{
-  local contents
-  printf "Enter ${1:-header} contents: " >/dev/tty
-  read contents </dev/tty
-  echo "$contents"
-}
-
-script="${0%/*}/${2:-}"
-if [ -f "$script" ] && [ -x "$script" ]; then
-  if [ -z "${__RLWRAPPED:-}" ] && [ -x $(command -v rlwrap) ]; then
-    __RLWRAPPED=true exec rlwrap "$0" "$@"
-  fi
-
-  contents_source="$script"
-  shift
-else
-  contents_source=get_header_contents
-fi
-
-editor=
-case "$0" in
-  *append-header|*supersede-header|*replace-header)
-    contents="${2:-}"
-    [ -n "$contents" ] || contents="$(eval $contents_source $header)"
-    case "$0" in
-      *append-header) flag=-A;;
-      *supersede-header) flag=-i;;
-      *replace-header) flag=-I;;
-    esac
-    editor="${0%/*}/filter-proxy formail $flag \'$header: $contents\'"
-    ;;
-
-  *remove-header)
-    editor="${0%/*}/filter-proxy formail -I \'$header:\'"
-    ;;
-
-  *)
-    echo "E: unknown invocation: ${0##*/}" >&2
-    exit 1
-    ;;
-
-esac
-
-echo "set my_editor=\"\$editor\""
-echo "set my_filter=\"$editor\""
-echo -n "push '"
-echo -n "<enter-command>set editor=\"\$my_filter\"<enter>"
-echo -n "<edit>"
-echo -n "<enter-command>set editor=\"\$my_editor\"<enter>"
-echo -n "<enter-command>unset my_filter<enter>"
-echo -n "<enter-command>unset my_editor<enter>"
-echo "'"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..5cc745f68f42c214c8db7f63b6fa650810fbebcc
--- /dev/null
@@ -0,0 +1 @@
+edit-header
\ No newline at end of file
deleted file mode 100755 (executable)
index 37f40ad63f90f0060f4d740b4a76b6fb0dd74365..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/bin/sh
-
-#exec 2>> /tmp/bgrun.stderr
-#set -x
-
-SELF="${0##*/}"
-
-TEMPDIR=
-TEMPRUNDIR=.tempdir-run.d
-cleanup() {
-  if [ -d $TEMPRUNDIR ]; then
-    local TEMPDIR; TEMPDIR="$PWD"
-    notify_output
-    cd /
-    rm -rf "$TEMPDIR"
-  fi
-  trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-}
-trap cleanup 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-
-enter_tempdir() {
-  if [ -d $TEMPRUNDIR ]; then
-    return
-
-  else
-    if [ -z "${TMPDIR:-}" ]; then
-      TMPDIR=/tmp
-    fi
-    for i in $LOGNAME volatile; do
-      if [ -d "${TMPDIR}/$i" ]; then
-        TMPDIR="${TMPDIR}/$i"
-        break
-      fi
-    done
-    cd $(mktemp -dp "$TMPDIR" mutt.XXXXXXXXXX)
-    mkdir $TEMPRUNDIR
-  fi
-}
-
-notify() {
-  if [ -x "$(command -v awesome-client)" ]; then
-    local stdout stderr escaped output
-    stdout="${2:-}"
-    stderr="${3:-}"
-    for i in stdout stderr; do
-      if eval test -s $TEMPRUNDIR/output.$i; then
-        escaped=$(eval sed -e 's,\",\\\",g' $TEMPRUNDIR/output.$i)
-        output="${output:+$output
-}${i}:
-$escaped"
-      fi
-    done
-    [ -n "${escaped:-}" ] || return
-    awesome-client <<-_eof
-       local naughty = require("naughty")
-       naughty.notify({ preset = naughty.config.presets.low,
-               title  = "${1:-Output from mutt/$SELF}",
-               text   = [[$output]]
-               })
-       _eof
-  fi
-}
-
-notify_output() {
-  [ -d $TEMPRUNDIR ] || return
-  local stdout stderr anything
-
-  for i in stdout stderr; do
-    if [ -s "$TEMPRUNDIR/output.$i" ]; then
-      eval $i="'$TEMPRUNDIR/output.$i'"
-    else
-      eval $i=/dev/null
-    fi
-  done
-
-  notify "Output from mutt/$SELF" $stdout $stderr
-}
-
-guess_extension() {
-  python3 -c "import mimetypes; print(mimetypes.guess_extension('$1'))"
-}
-
-get_file() {
-  local t
-  if [ -z "$1" ]; then
-    t=$(mktemp -p "$PWD" tmp.XXXXXXXXXX$(guess_extension "$MIMETYPE"))
-    cat > "$t"
-    echo "$t"
-  else
-    t="$(echo -n ${1##*/} | sed -re 's![^[:alnum:],.@%^+=_-]!_!gi')"
-    ln "$1" "$t" 2>/dev/null || cp "$1" "$t"
-    echo "$PWD/$t"
-  fi
-}
-
-MIMETYPE= FILENAME= VIEWER= DELAY=1
-state=
-for arg in "$@"; do
-  case "$state/$arg" in
-
-    (/-t) state=t;;
-    (t/*) MIMETYPE="$arg"; state=;;
-
-    (/-f) state=f;;
-    (f/*) FILENAME="$arg"; state=;;
-
-    (/-d) state=d;;
-    (d/*) DELAY="$arg"; state=;;
-
-    (/-v) state=v;;
-    (v/*) VIEWER="$arg"; state=;;
-
-    (*)
-      echo >&2 "E: Invalid argument: $i"
-      exit 1
-      ;;
-
-  esac
-done
-
-launch_viewer() {
-  local filename; filename="$1"
-  if [ -z "$VIEWER" ]; then
-    [ -n "${2:-}" ] && filename="${2}:${1}"
-    run-mailcap "$filename" > $TEMPRUNDIR/output.stdout 2> $TEMPRUNDIR/output.stderr
-  else
-    $VIEWER "$filename" > $TEMPRUNDIR/output.stdout 2> $TEMPRUNDIR/output.stderr
-  fi
-}
-
-case "$SELF" in
-  (bgview)
-    # make a copy of the file, then launch a shell process in the background
-    # to divert to run-mailcap, after which the temporary directory gets
-    # cleaned up.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    (
-      ts=$(($(date +%s) + $DELAY))
-      launch_viewer "$FILE" "$MIMETYPE"
-      while [ $(date +%s) -lt $ts ]; do sleep 1; done
-      cleanup
-    ) &
-    trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-    ;;
-  (bgview-fifo)
-    # hack to stay around until the viewer has read the file: make a fifo and
-    # wait for the cat process to finish writing to it, which means that it
-    # must have been consumed on the other end.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    FIFO="fifo-${FILE##*/}"
-    mkfifo "$FIFO"
-    cat "$FILE" > "$FIFO" &
-    # For some reason, we do have to write a tempfile and cannot seem to
-    # redirect stdin directly to the fifo, i.e. this does not work instead of
-    # the previous three lines:
-    ## cat > "$FIFO" &
-    launch_viewer "$FIFO" "$MIMETYPE"
-    wait
-    cleanup
-    ;;
-  (bgview-delay)
-    # hack to stay around until the file hasn't been accessed for a few
-    # seconds, so that we can clean up. This is for cases when the FIFO method
-    # doesn't work, because e.g. Firefox randomly chooses it needs to read
-    # HTML files twice.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    touch "$FILE"
-    (launch_viewer "$FILE" "$MIMETYPE") &
-    (
-      while [ $(($(stat -c%X "$FILE") + $DELAY)) -gt $(date +%s) ]; do
-        sleep 1
-      done
-      cleanup
-    ) &
-    trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-    ;;
-esac
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..b07e7aa9214f3112d249dce94d87d013e7d8441d
--- /dev/null
@@ -0,0 +1 @@
+bgrun
\ No newline at end of file
deleted file mode 100755 (executable)
index 37f40ad63f90f0060f4d740b4a76b6fb0dd74365..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/bin/sh
-
-#exec 2>> /tmp/bgrun.stderr
-#set -x
-
-SELF="${0##*/}"
-
-TEMPDIR=
-TEMPRUNDIR=.tempdir-run.d
-cleanup() {
-  if [ -d $TEMPRUNDIR ]; then
-    local TEMPDIR; TEMPDIR="$PWD"
-    notify_output
-    cd /
-    rm -rf "$TEMPDIR"
-  fi
-  trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-}
-trap cleanup 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-
-enter_tempdir() {
-  if [ -d $TEMPRUNDIR ]; then
-    return
-
-  else
-    if [ -z "${TMPDIR:-}" ]; then
-      TMPDIR=/tmp
-    fi
-    for i in $LOGNAME volatile; do
-      if [ -d "${TMPDIR}/$i" ]; then
-        TMPDIR="${TMPDIR}/$i"
-        break
-      fi
-    done
-    cd $(mktemp -dp "$TMPDIR" mutt.XXXXXXXXXX)
-    mkdir $TEMPRUNDIR
-  fi
-}
-
-notify() {
-  if [ -x "$(command -v awesome-client)" ]; then
-    local stdout stderr escaped output
-    stdout="${2:-}"
-    stderr="${3:-}"
-    for i in stdout stderr; do
-      if eval test -s $TEMPRUNDIR/output.$i; then
-        escaped=$(eval sed -e 's,\",\\\",g' $TEMPRUNDIR/output.$i)
-        output="${output:+$output
-}${i}:
-$escaped"
-      fi
-    done
-    [ -n "${escaped:-}" ] || return
-    awesome-client <<-_eof
-       local naughty = require("naughty")
-       naughty.notify({ preset = naughty.config.presets.low,
-               title  = "${1:-Output from mutt/$SELF}",
-               text   = [[$output]]
-               })
-       _eof
-  fi
-}
-
-notify_output() {
-  [ -d $TEMPRUNDIR ] || return
-  local stdout stderr anything
-
-  for i in stdout stderr; do
-    if [ -s "$TEMPRUNDIR/output.$i" ]; then
-      eval $i="'$TEMPRUNDIR/output.$i'"
-    else
-      eval $i=/dev/null
-    fi
-  done
-
-  notify "Output from mutt/$SELF" $stdout $stderr
-}
-
-guess_extension() {
-  python3 -c "import mimetypes; print(mimetypes.guess_extension('$1'))"
-}
-
-get_file() {
-  local t
-  if [ -z "$1" ]; then
-    t=$(mktemp -p "$PWD" tmp.XXXXXXXXXX$(guess_extension "$MIMETYPE"))
-    cat > "$t"
-    echo "$t"
-  else
-    t="$(echo -n ${1##*/} | sed -re 's![^[:alnum:],.@%^+=_-]!_!gi')"
-    ln "$1" "$t" 2>/dev/null || cp "$1" "$t"
-    echo "$PWD/$t"
-  fi
-}
-
-MIMETYPE= FILENAME= VIEWER= DELAY=1
-state=
-for arg in "$@"; do
-  case "$state/$arg" in
-
-    (/-t) state=t;;
-    (t/*) MIMETYPE="$arg"; state=;;
-
-    (/-f) state=f;;
-    (f/*) FILENAME="$arg"; state=;;
-
-    (/-d) state=d;;
-    (d/*) DELAY="$arg"; state=;;
-
-    (/-v) state=v;;
-    (v/*) VIEWER="$arg"; state=;;
-
-    (*)
-      echo >&2 "E: Invalid argument: $i"
-      exit 1
-      ;;
-
-  esac
-done
-
-launch_viewer() {
-  local filename; filename="$1"
-  if [ -z "$VIEWER" ]; then
-    [ -n "${2:-}" ] && filename="${2}:${1}"
-    run-mailcap "$filename" > $TEMPRUNDIR/output.stdout 2> $TEMPRUNDIR/output.stderr
-  else
-    $VIEWER "$filename" > $TEMPRUNDIR/output.stdout 2> $TEMPRUNDIR/output.stderr
-  fi
-}
-
-case "$SELF" in
-  (bgview)
-    # make a copy of the file, then launch a shell process in the background
-    # to divert to run-mailcap, after which the temporary directory gets
-    # cleaned up.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    (
-      ts=$(($(date +%s) + $DELAY))
-      launch_viewer "$FILE" "$MIMETYPE"
-      while [ $(date +%s) -lt $ts ]; do sleep 1; done
-      cleanup
-    ) &
-    trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-    ;;
-  (bgview-fifo)
-    # hack to stay around until the viewer has read the file: make a fifo and
-    # wait for the cat process to finish writing to it, which means that it
-    # must have been consumed on the other end.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    FIFO="fifo-${FILE##*/}"
-    mkfifo "$FIFO"
-    cat "$FILE" > "$FIFO" &
-    # For some reason, we do have to write a tempfile and cannot seem to
-    # redirect stdin directly to the fifo, i.e. this does not work instead of
-    # the previous three lines:
-    ## cat > "$FIFO" &
-    launch_viewer "$FIFO" "$MIMETYPE"
-    wait
-    cleanup
-    ;;
-  (bgview-delay)
-    # hack to stay around until the file hasn't been accessed for a few
-    # seconds, so that we can clean up. This is for cases when the FIFO method
-    # doesn't work, because e.g. Firefox randomly chooses it needs to read
-    # HTML files twice.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    touch "$FILE"
-    (launch_viewer "$FILE" "$MIMETYPE") &
-    (
-      while [ $(($(stat -c%X "$FILE") + $DELAY)) -gt $(date +%s) ]; do
-        sleep 1
-      done
-      cleanup
-    ) &
-    trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-    ;;
-esac
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..b07e7aa9214f3112d249dce94d87d013e7d8441d
--- /dev/null
@@ -0,0 +1 @@
+bgrun
\ No newline at end of file
deleted file mode 100755 (executable)
index 37f40ad63f90f0060f4d740b4a76b6fb0dd74365..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,180 +0,0 @@
-#!/bin/sh
-
-#exec 2>> /tmp/bgrun.stderr
-#set -x
-
-SELF="${0##*/}"
-
-TEMPDIR=
-TEMPRUNDIR=.tempdir-run.d
-cleanup() {
-  if [ -d $TEMPRUNDIR ]; then
-    local TEMPDIR; TEMPDIR="$PWD"
-    notify_output
-    cd /
-    rm -rf "$TEMPDIR"
-  fi
-  trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-}
-trap cleanup 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-
-enter_tempdir() {
-  if [ -d $TEMPRUNDIR ]; then
-    return
-
-  else
-    if [ -z "${TMPDIR:-}" ]; then
-      TMPDIR=/tmp
-    fi
-    for i in $LOGNAME volatile; do
-      if [ -d "${TMPDIR}/$i" ]; then
-        TMPDIR="${TMPDIR}/$i"
-        break
-      fi
-    done
-    cd $(mktemp -dp "$TMPDIR" mutt.XXXXXXXXXX)
-    mkdir $TEMPRUNDIR
-  fi
-}
-
-notify() {
-  if [ -x "$(command -v awesome-client)" ]; then
-    local stdout stderr escaped output
-    stdout="${2:-}"
-    stderr="${3:-}"
-    for i in stdout stderr; do
-      if eval test -s $TEMPRUNDIR/output.$i; then
-        escaped=$(eval sed -e 's,\",\\\",g' $TEMPRUNDIR/output.$i)
-        output="${output:+$output
-}${i}:
-$escaped"
-      fi
-    done
-    [ -n "${escaped:-}" ] || return
-    awesome-client <<-_eof
-       local naughty = require("naughty")
-       naughty.notify({ preset = naughty.config.presets.low,
-               title  = "${1:-Output from mutt/$SELF}",
-               text   = [[$output]]
-               })
-       _eof
-  fi
-}
-
-notify_output() {
-  [ -d $TEMPRUNDIR ] || return
-  local stdout stderr anything
-
-  for i in stdout stderr; do
-    if [ -s "$TEMPRUNDIR/output.$i" ]; then
-      eval $i="'$TEMPRUNDIR/output.$i'"
-    else
-      eval $i=/dev/null
-    fi
-  done
-
-  notify "Output from mutt/$SELF" $stdout $stderr
-}
-
-guess_extension() {
-  python3 -c "import mimetypes; print(mimetypes.guess_extension('$1'))"
-}
-
-get_file() {
-  local t
-  if [ -z "$1" ]; then
-    t=$(mktemp -p "$PWD" tmp.XXXXXXXXXX$(guess_extension "$MIMETYPE"))
-    cat > "$t"
-    echo "$t"
-  else
-    t="$(echo -n ${1##*/} | sed -re 's![^[:alnum:],.@%^+=_-]!_!gi')"
-    ln "$1" "$t" 2>/dev/null || cp "$1" "$t"
-    echo "$PWD/$t"
-  fi
-}
-
-MIMETYPE= FILENAME= VIEWER= DELAY=1
-state=
-for arg in "$@"; do
-  case "$state/$arg" in
-
-    (/-t) state=t;;
-    (t/*) MIMETYPE="$arg"; state=;;
-
-    (/-f) state=f;;
-    (f/*) FILENAME="$arg"; state=;;
-
-    (/-d) state=d;;
-    (d/*) DELAY="$arg"; state=;;
-
-    (/-v) state=v;;
-    (v/*) VIEWER="$arg"; state=;;
-
-    (*)
-      echo >&2 "E: Invalid argument: $i"
-      exit 1
-      ;;
-
-  esac
-done
-
-launch_viewer() {
-  local filename; filename="$1"
-  if [ -z "$VIEWER" ]; then
-    [ -n "${2:-}" ] && filename="${2}:${1}"
-    run-mailcap "$filename" > $TEMPRUNDIR/output.stdout 2> $TEMPRUNDIR/output.stderr
-  else
-    $VIEWER "$filename" > $TEMPRUNDIR/output.stdout 2> $TEMPRUNDIR/output.stderr
-  fi
-}
-
-case "$SELF" in
-  (bgview)
-    # make a copy of the file, then launch a shell process in the background
-    # to divert to run-mailcap, after which the temporary directory gets
-    # cleaned up.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    (
-      ts=$(($(date +%s) + $DELAY))
-      launch_viewer "$FILE" "$MIMETYPE"
-      while [ $(date +%s) -lt $ts ]; do sleep 1; done
-      cleanup
-    ) &
-    trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-    ;;
-  (bgview-fifo)
-    # hack to stay around until the viewer has read the file: make a fifo and
-    # wait for the cat process to finish writing to it, which means that it
-    # must have been consumed on the other end.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    FIFO="fifo-${FILE##*/}"
-    mkfifo "$FIFO"
-    cat "$FILE" > "$FIFO" &
-    # For some reason, we do have to write a tempfile and cannot seem to
-    # redirect stdin directly to the fifo, i.e. this does not work instead of
-    # the previous three lines:
-    ## cat > "$FIFO" &
-    launch_viewer "$FIFO" "$MIMETYPE"
-    wait
-    cleanup
-    ;;
-  (bgview-delay)
-    # hack to stay around until the file hasn't been accessed for a few
-    # seconds, so that we can clean up. This is for cases when the FIFO method
-    # doesn't work, because e.g. Firefox randomly chooses it needs to read
-    # HTML files twice.
-    enter_tempdir
-    FILE="$(get_file "$FILENAME")"
-    touch "$FILE"
-    (launch_viewer "$FILE" "$MIMETYPE") &
-    (
-      while [ $(($(stat -c%X "$FILE") + $DELAY)) -gt $(date +%s) ]; do
-        sleep 1
-      done
-      cleanup
-    ) &
-    trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
-    ;;
-esac
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..b07e7aa9214f3112d249dce94d87d013e7d8441d
--- /dev/null
@@ -0,0 +1 @@
+bgrun
\ No newline at end of file
deleted file mode 100755 (executable)
index ab7444bb5eb7b68f98666dd381c0434d7877fb22..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# edit-header - helper script to append/replace/remove headers with mutt
-#
-# Based on an idea by David Champion <dgc at uchicago.edu>
-#
-# Copyright © 2008 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-set -eu
-
-if [ ! -x "$(command -v formail)" ]; then
-  echo E: formail not installed. >&2
-  exit 1
-fi
-
-header="${1:-}"
-if [ -z "$header" ]; then
-  echo "E: no header specified" >&2
-  exit 1
-fi
-
-get_header_contents()
-{
-  local contents
-  printf "Enter ${1:-header} contents: " >/dev/tty
-  read contents </dev/tty
-  echo "$contents"
-}
-
-script="${0%/*}/${2:-}"
-if [ -f "$script" ] && [ -x "$script" ]; then
-  if [ -z "${__RLWRAPPED:-}" ] && [ -x $(command -v rlwrap) ]; then
-    __RLWRAPPED=true exec rlwrap "$0" "$@"
-  fi
-
-  contents_source="$script"
-  shift
-else
-  contents_source=get_header_contents
-fi
-
-editor=
-case "$0" in
-  *append-header|*supersede-header|*replace-header)
-    contents="${2:-}"
-    [ -n "$contents" ] || contents="$(eval $contents_source $header)"
-    case "$0" in
-      *append-header) flag=-A;;
-      *supersede-header) flag=-i;;
-      *replace-header) flag=-I;;
-    esac
-    editor="${0%/*}/filter-proxy formail $flag \'$header: $contents\'"
-    ;;
-
-  *remove-header)
-    editor="${0%/*}/filter-proxy formail -I \'$header:\'"
-    ;;
-
-  *)
-    echo "E: unknown invocation: ${0##*/}" >&2
-    exit 1
-    ;;
-
-esac
-
-echo "set my_editor=\"\$editor\""
-echo "set my_filter=\"$editor\""
-echo -n "push '"
-echo -n "<enter-command>set editor=\"\$my_filter\"<enter>"
-echo -n "<edit>"
-echo -n "<enter-command>set editor=\"\$my_editor\"<enter>"
-echo -n "<enter-command>unset my_filter<enter>"
-echo -n "<enter-command>unset my_editor<enter>"
-echo "'"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..5cc745f68f42c214c8db7f63b6fa650810fbebcc
--- /dev/null
@@ -0,0 +1 @@
+edit-header
\ No newline at end of file
deleted file mode 100755 (executable)
index ab7444bb5eb7b68f98666dd381c0434d7877fb22..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# edit-header - helper script to append/replace/remove headers with mutt
-#
-# Based on an idea by David Champion <dgc at uchicago.edu>
-#
-# Copyright © 2008 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-set -eu
-
-if [ ! -x "$(command -v formail)" ]; then
-  echo E: formail not installed. >&2
-  exit 1
-fi
-
-header="${1:-}"
-if [ -z "$header" ]; then
-  echo "E: no header specified" >&2
-  exit 1
-fi
-
-get_header_contents()
-{
-  local contents
-  printf "Enter ${1:-header} contents: " >/dev/tty
-  read contents </dev/tty
-  echo "$contents"
-}
-
-script="${0%/*}/${2:-}"
-if [ -f "$script" ] && [ -x "$script" ]; then
-  if [ -z "${__RLWRAPPED:-}" ] && [ -x $(command -v rlwrap) ]; then
-    __RLWRAPPED=true exec rlwrap "$0" "$@"
-  fi
-
-  contents_source="$script"
-  shift
-else
-  contents_source=get_header_contents
-fi
-
-editor=
-case "$0" in
-  *append-header|*supersede-header|*replace-header)
-    contents="${2:-}"
-    [ -n "$contents" ] || contents="$(eval $contents_source $header)"
-    case "$0" in
-      *append-header) flag=-A;;
-      *supersede-header) flag=-i;;
-      *replace-header) flag=-I;;
-    esac
-    editor="${0%/*}/filter-proxy formail $flag \'$header: $contents\'"
-    ;;
-
-  *remove-header)
-    editor="${0%/*}/filter-proxy formail -I \'$header:\'"
-    ;;
-
-  *)
-    echo "E: unknown invocation: ${0##*/}" >&2
-    exit 1
-    ;;
-
-esac
-
-echo "set my_editor=\"\$editor\""
-echo "set my_filter=\"$editor\""
-echo -n "push '"
-echo -n "<enter-command>set editor=\"\$my_filter\"<enter>"
-echo -n "<edit>"
-echo -n "<enter-command>set editor=\"\$my_editor\"<enter>"
-echo -n "<enter-command>unset my_filter<enter>"
-echo -n "<enter-command>unset my_editor<enter>"
-echo "'"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..5cc745f68f42c214c8db7f63b6fa650810fbebcc
--- /dev/null
@@ -0,0 +1 @@
+edit-header
\ No newline at end of file
deleted file mode 100755 (executable)
index ab7444bb5eb7b68f98666dd381c0434d7877fb22..0000000000000000000000000000000000000000
+++ /dev/null
@@ -1,75 +0,0 @@
-#!/bin/sh
-#
-# edit-header - helper script to append/replace/remove headers with mutt
-#
-# Based on an idea by David Champion <dgc at uchicago.edu>
-#
-# Copyright © 2008 martin f. krafft <madduck@madduck.net>
-# Released under the terms of the Artistic Licence 2.0
-#
-set -eu
-
-if [ ! -x "$(command -v formail)" ]; then
-  echo E: formail not installed. >&2
-  exit 1
-fi
-
-header="${1:-}"
-if [ -z "$header" ]; then
-  echo "E: no header specified" >&2
-  exit 1
-fi
-
-get_header_contents()
-{
-  local contents
-  printf "Enter ${1:-header} contents: " >/dev/tty
-  read contents </dev/tty
-  echo "$contents"
-}
-
-script="${0%/*}/${2:-}"
-if [ -f "$script" ] && [ -x "$script" ]; then
-  if [ -z "${__RLWRAPPED:-}" ] && [ -x $(command -v rlwrap) ]; then
-    __RLWRAPPED=true exec rlwrap "$0" "$@"
-  fi
-
-  contents_source="$script"
-  shift
-else
-  contents_source=get_header_contents
-fi
-
-editor=
-case "$0" in
-  *append-header|*supersede-header|*replace-header)
-    contents="${2:-}"
-    [ -n "$contents" ] || contents="$(eval $contents_source $header)"
-    case "$0" in
-      *append-header) flag=-A;;
-      *supersede-header) flag=-i;;
-      *replace-header) flag=-I;;
-    esac
-    editor="${0%/*}/filter-proxy formail $flag \'$header: $contents\'"
-    ;;
-
-  *remove-header)
-    editor="${0%/*}/filter-proxy formail -I \'$header:\'"
-    ;;
-
-  *)
-    echo "E: unknown invocation: ${0##*/}" >&2
-    exit 1
-    ;;
-
-esac
-
-echo "set my_editor=\"\$editor\""
-echo "set my_filter=\"$editor\""
-echo -n "push '"
-echo -n "<enter-command>set editor=\"\$my_filter\"<enter>"
-echo -n "<edit>"
-echo -n "<enter-command>set editor=\"\$my_editor\"<enter>"
-echo -n "<enter-command>unset my_filter<enter>"
-echo -n "<enter-command>unset my_editor<enter>"
-echo "'"
new file mode 120000 (symlink)
index 0000000000000000000000000000000000000000..5cc745f68f42c214c8db7f63b6fa650810fbebcc
--- /dev/null
@@ -0,0 +1 @@
+edit-header
\ No newline at end of file