aboutsummaryrefslogtreecommitdiff
path: root/dfm.c
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2026-03-12 11:55:10 +0200
committerDylan Araps <dylan.araps@gmail.com>2026-03-12 11:55:10 +0200
commit9df05cf368448e487b15d263a6f1a1a725e52f90 (patch)
tree36c268a81d0940e78a59d2ffb774562b8a8f6a20 /dfm.c
parent6d42e7e3638556f6524de9403ef5692001bcb274 (diff)
dfm: better exec message
Shows "command not found" which is clearer
Diffstat (limited to 'dfm.c')
-rw-r--r--dfm.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/dfm.c b/dfm.c
index 02eae64..23d0b68 100644
--- a/dfm.c
+++ b/dfm.c
@@ -2309,7 +2309,10 @@ fm_exec(struct fm *p, int in, const char *d, const char *const a[], bool bg, boo
int r = run_cmd(bg ? p->t.null : p->t.fd, in, d, a, bg);
if (tf) fm_term_raw(p);
if (r == -1) {
- fm_draw_err(p, S("exec"), errno);
+ if (errno == ENOENT)
+ fm_draw_err(p, S("exec: command not found"), 0);
+ else
+ fm_draw_err(p, S("exec"), errno);
return -1;
}
if (WIFEXITED(r)) {