bin: add jrnl-tag & errexit
This commit is contained in:
parent
2230d3fada
commit
f2bd42f3f6
|
@ -19,10 +19,10 @@ case $1 in
|
||||||
(pandoc) man pandoc; highlight "Extensions" && pandoc --list-extensions | paste -s -d' ';;
|
(pandoc) man pandoc; highlight "Extensions" && pandoc --list-extensions | paste -s -d' ';;
|
||||||
(swaymsg) test $# -gt 1 && man sway "${@:2}" || man swaymsg;;
|
(swaymsg) test $# -gt 1 && man sway "${@:2}" || man swaymsg;;
|
||||||
(swaymsg-*) man sway "${1#swaymsg-}";;
|
(swaymsg-*) man sway "${1#swaymsg-}";;
|
||||||
(*) man "$@" ||
|
(*) { info "$1" -w | grep -v "manpages" && pinfo "$@"; } ||
|
||||||
{ info "$1" -w | grep -v "manpages" && pinfo "$@"; } ||
|
man "$@" ||
|
||||||
if which "$1" >/dev/null
|
if which "$1" >/dev/null
|
||||||
then "$@" --help || { test $? == 1 && "$@" -help; } || { test $? == 1 && "$@" -h; } 2>&1 | $paginate
|
then { "$@" --help || { test $? == 1 && "$@" -help; } || { test $? == 1 && "$@" -h; }; } 2>&1 | $paginate
|
||||||
fi;;
|
fi;;
|
||||||
esac
|
esac
|
||||||
docs="/usr/share/doc/$1"
|
docs="/usr/share/doc/$1"
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
rpl "\(^\|[^@]\)\b$1\b" "\1@$1" $JOURNAL/*.txt
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
# [M]edia [P]lay
|
# [M]edia [P]lay
|
||||||
# Play given files on mpd, playing external files through symlinking and recursively resolving playlists
|
# Play given files on mpd, playing external files through symlinking and recursively resolving playlists
|
||||||
# depends: xargs realpath mpc
|
# depends: xargs realpath mpc
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
# Use grep and sed to replace $1 with $2 recursively and print what is done
|
# Use grep and sed to replace $1 with $2 recursively and print what is done
|
||||||
grep --null --recursive --files-with-matches \
|
grep --null --recursive --files-with-matches \
|
||||||
--binary-files=without-match "--exclude-dir={$DIRS_IGNORE}" "$1" |
|
--binary-files=without-match "--exclude-dir={$DIRS_IGNORE}" "$1" "${@:3}" |
|
||||||
xargs -0 sed -i "\|${1}|{
|
xargs -0 sed -i "\%${1}%{
|
||||||
s||${2}|g
|
s||${2}|g
|
||||||
w /dev/stdout
|
w /dev/stdout
|
||||||
}"
|
}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue