From 7e19d0f0c26abb2eb32b7067640c0897d7936e4a Mon Sep 17 00:00:00 2001 From: Nathan Reiner Date: Wed, 15 Feb 2023 17:12:44 +0100 Subject: add add prompt script --- config/smash.d/prompt | 5 +++++ lib/sys/getcwd.h | 11 +++++++++++ 2 files changed, 16 insertions(+) create mode 100755 config/smash.d/prompt create mode 100644 lib/sys/getcwd.h diff --git a/config/smash.d/prompt b/config/smash.d/prompt new file mode 100755 index 0000000..fa2a8e5 --- /dev/null +++ b/config/smash.d/prompt @@ -0,0 +1,5 @@ +#!/system/core/smash + +[CWD]=cwd + +print " %S%F%s%S@%S%F%s%S %s > " BOLD RED liveiso RESET BOLD GREEN rex RESET $[CWD] diff --git a/lib/sys/getcwd.h b/lib/sys/getcwd.h new file mode 100644 index 0000000..ee14c2f --- /dev/null +++ b/lib/sys/getcwd.h @@ -0,0 +1,11 @@ +#ifndef GETCWD_H +#define GETCWD_H + +#include "syscalls.h" + +static int getcwd(char *buf, unsigned long size) +{ + return syscall(GETCWD, buf, size); +} + +#endif -- cgit v1.2.3-70-g09d2