scripts

Various scripts for UNIX-like systems
git clone https://git.tronto.net/scripts
Download | Log | Files | Refs | README

commit 5ac980dec555c543815d9defc3b7192354539b6c
parent bea38c1ce49b5e5e60e4e9f9261ec176ff59cd3c
Author: Sebastiano Tronto <sebastiano.tronto@gmail.com>
Date:   Wed, 22 Dec 2021 09:57:53 +0100

Fixed open-file, changed a bit open-stdin

Diffstat:
Mopen-file | 1+
Mopen-stdin | 2+-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/open-file b/open-file @@ -20,6 +20,7 @@ xedit=${XEDITOR:-gedit} openfile() { f="$@" + localmime="$mimetype" [ ! -f "$f" ] && echo "$f: bad argument" && exit 1 [ -z "$mimetype" ] && localmime="$(file --mime-type "$f" -bL)" diff --git a/open-stdin b/open-stdin @@ -9,4 +9,4 @@ folder=${TMPDIR:-/tmp} tempfile=$(mktemp -p "$folder") -cat > "$tempfile" && open-file -s spawn -t "$1" "$tempfile" +cat > "$tempfile" && open-file $@ "$tempfile"