stumpwm-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[STUMP] run-shell-command - displaying message on program error


From: Олексій Замковий
Subject: [STUMP] run-shell-command - displaying message on program error
Date: Sun, 3 Jul 2011 11:19:28 +0300

Current behaviour of run-shell-command when passing path to
non-existent program as argument to it is to do nothing, just silently
ignore error.
I've created a new command run-shell-command-display-errors which
displays error when passed argument program exits with non-zero
status. This behaviour is similar to Ion window manager run command
behaviour.
Here is some example stumpish session that show how commands differ.

> run-shell-command test
> run-shell-command-display-errors test
Program exited with code 1 and has
 error output
< empty >
 normal output
< empty >
> run-shell-command cat non-existent-file
> run-shell-command-display-errors cat non-existent-file
Program exited with code 1 and has
 error output
cat: non-existent-file: No such file or directory
 normal output
< empty >
>

Now in my config I replaced run-shell-command with
run-shell-command-display-errors

(define-key *root-map* (kbd "!") "run-shell-command-display-errors")

My previous messages on other subject to this mailing list were
ignored so I don't know if this one will be and don't know if people
find such feature useful. If you need code please tell me. Code uses
one external package (external-program).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]