diff options
| author | ruki <[email protected]> | 2021-04-21 00:40:28 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2021-04-21 00:40:28 +0800 |
| commit | d8f8d6c465bd7e522549943d18898fb806fe52a6 (patch) | |
| tree | 4c17d1e5691efb16a295133ea9000eb90929deae | |
| parent | 6419e11c3b64fe4a97c112dc9462499811af183f (diff) | |
improve prompt
| -rw-r--r-- | xmake/modules/private/xrepo/action/env.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/modules/private/xrepo/action/env.lua b/xmake/modules/private/xrepo/action/env.lua index 893b68cce..019bbc59b 100644 --- a/xmake/modules/private/xrepo/action/env.lua +++ b/xmake/modules/private/xrepo/action/env.lua @@ -240,7 +240,7 @@ function _run_shell(envs) local args = table.join({"-c", "'function prompt { \\\"[" .. projectname .. "] \\\" + $(Get-Location) + \\\"> \\\" }'"}, option.get("arguments")) os.execv("pwsh", args, {envs = envs}) elseif shell:endswith("sh") then - local prompt = "[" .. projectname .. "] " .. (os.getenv("PS1") or "\\W $ ") + local prompt = "[" .. projectname .. "] " .. (os.getenv("PS1") or "> ") os.execv(shell, option.get("arguments"), {envs = table.join({PS1 = prompt}, envs)}) elseif shell == "powershell" then local args = table.join({"-c", "'function prompt { \\\"[" .. projectname .. "] \\\" + $(Get-Location) + \\\"> \\\" }'"}, option.get("arguments")) |
