chore(shell): showing only the executable name instead of full path
This commit is contained in:
@@ -509,6 +509,9 @@ string getUptime() {
|
|||||||
string getShell() {
|
string getShell() {
|
||||||
string shell;
|
string shell;
|
||||||
shell = std::getenv("SHELL");
|
shell = std::getenv("SHELL");
|
||||||
|
|
||||||
|
while(shell.find('/') < shell.length()) shell.erase(0, shell.find('/') + 1);
|
||||||
|
|
||||||
if (!shell.empty()) return shell;
|
if (!shell.empty()) return shell;
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|||||||
Reference in New Issue
Block a user