From 8fe23efe772ed497dbcbc66f7ef276b1cfe0952b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 21 May 2017 15:48:05 +0200 Subject: [PATCH 1/3] include grc.zsh and grc.fish in install.sh --- README.markdown | 1 + install.sh | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 1c63e94..24c7f90 100644 --- a/README.markdown +++ b/README.markdown @@ -198,3 +198,4 @@ Or for zsh users, append to `~/.zshrc`: Add to `~/.config/fish/config.fish` or in a new file in `~/.config/fish/conf.d/`: source /usr/local/etc/grc.fish + diff --git a/install.sh b/install.sh index 4aa0aed..312d139 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,8 @@ cp -fv grc.1 $MANDIR/man1 cp -fv grcat.1 $MANDIR/man1 mkdir -p $CONFDIR cp -fv grc.conf $CONFDIR +cp -fv grc.zsh $CONFDIR +cp -fv grc.fish $CONFDIR mkdir -p $PROFILEDIR cp -fv grc.bashrc $PROFILEDIR - From e10d7d257f727a9c6998d7bda6a045d00b866e3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 21 May 2017 16:00:34 +0200 Subject: [PATCH 2/3] catch nonexistent command even if conffile matches --- grc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/grc b/grc index 79122f0..24b1709 100755 --- a/grc +++ b/grc @@ -137,7 +137,11 @@ if cfile != "" and colour: os.dup2(chie, 2) os.close(choe) os.close(chie) - os.execvp(args[0], args) + try: + os.execvp(args[0], args) + except OSError as e: + sys.stderr.write('grc: %s: %s\n' % (args[0], e.strerror)) + sys.exit(1) if stdoutff: From 2df1e9725e9a9757588c87b4a40d0c680505ef41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Radovan=20Garab=C3=ADk?= Date: Sun, 21 May 2017 16:06:39 +0200 Subject: [PATCH 3/3] update changelog --- debian/changelog | 6 ++++++ grc | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3441969..dbc1b79 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +grc (1.11.1-1) unstable; urgency=low + + * better error handling if command is not found + + -- Radovan GarabĂ­k Sun, 21 May 2017 16:01:51 +0200 + grc (1.11-1) unstable; urgency=low * clean up directories diff --git a/grc b/grc index 24b1709..fe0738b 100755 --- a/grc +++ b/grc @@ -6,11 +6,11 @@ import os, re, string, sys, getopt, signal def version(): - print ("Generic Colouriser 1.11.1rc") + print ("Generic Colouriser 1.11.1") sys.exit() def help(): - print("""Generic Colouriser 1.11.1rc + print("""Generic Colouriser 1.11.1 grc [options] command [args] Options: -e --stderr redirect stderr. If this option is selected,