Various Linux scripts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
244 B

#!/bin/bash
# (c) https://stackoverflow.com/questions/10686183/pipe-vim-buffer-to-stdout/10686830#10686830
TMPFILE=$(mktemp /tmp/viper.XXXXXXXX)
cat > "$TMPFILE"
$EDITOR "$@" "$TMPFILE" < /dev/tty > /dev/tty
cat "$TMPFILE"
\rm -f "$TMPFILE"