From 20958b61186f22e6664a3a60325f5e5cd65c7205 Mon Sep 17 00:00:00 2001 From: TheDarkBug Date: Tue, 16 Mar 2021 20:25:09 +0100 Subject: [PATCH] Fixed #42, shortened shell name for termux. --- uwufetch.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/uwufetch.c b/uwufetch.c index e8329ef..4823289 100644 --- a/uwufetch.c +++ b/uwufetch.c @@ -176,7 +176,8 @@ void get_info() { // get all necessary info } fclose(cpuinfo); gethostname(host, 256); - sscanf(getenv("SHELL"), "%*[bin/]%s", shell); + sscanf(getenv("SHELL"), "%s", shell); + if (strlen(shell) > 16) memmove(&shell, &shell[27], sizeof(shell)); // android shell was too long, this works only for termux // system resources uname(&sys_var);