Mercurial > repo
changeset 9708:5b15e42489b9
<oerjan> mkx bin/whoops//OLD="wisdom/$1"; [ -z "$1" ] && OLD="$(lastfiles)"; NEW="${OLD}s"; if [ -f "$NEW" ]; then echo "\xc2\xab${NEW}\xc2\xbb already exists"; exit 1; fi; mv "$OLD" "$NEW" && echo "\xc2\xab${OLD}\xc2\xbb -> \xc2\xab${NEW}\xc2\xbb"
author | HackBot |
---|---|
date | Thu, 17 Nov 2016 17:19:55 +0000 |
parents | e5fd34d2adcc |
children | f7fda861e68d |
files | bin/whoops |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/whoops Thu Nov 17 17:06:57 2016 +0000 +++ b/bin/whoops Thu Nov 17 17:19:55 2016 +0000 @@ -1,2 +1,1 @@ -echo -n "$(basename "$0")${@:+ }$@: "; tail -n+2 "$0" | xargs; exit -we forgot to implement this command +OLD="wisdom/$1"; [ -z "$1" ] && OLD="$(lastfiles)"; NEW="${OLD}s"; if [ -f "$NEW" ]; then echo "«${NEW}» already exists"; exit 1; fi; mv "$OLD" "$NEW" && echo "«${OLD}» -> «${NEW}»"