paleofetch

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 9ddd26338fd11eaf803dd571d136a89e29b0106d
parent 6aaeef56207586555401b6b6c6bcacaa7c1d73e3
Author: sam-barr <samfbarr@outlook.com>
Date:   Tue, 21 Apr 2020 23:45:35 -0500

Make get_shell() handle shells that aren't in /bin

courtesy of allisio

Diffstat:
Mpaleofetch.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/paleofetch.c b/paleofetch.c @@ -152,7 +152,7 @@ char *get_packages() { char *get_shell() { char *shell = malloc(BUF_SIZE); - sscanf(getenv("SHELL"), "/bin/%s", shell); + strncpy(shell, strrchr(getenv("SHELL"), '/') + 1, BUF_SIZE); return shell; }