Make prompts simpler

This commit is contained in:
Anthony Rose 2024-11-19 12:18:03 +00:00
parent d0d5b0598c
commit deb28dfab1
2 changed files with 3 additions and 10 deletions

View file

@ -7,15 +7,10 @@ function Prompt {
if ($IsWindows -or ($env:OS -eq "Windows_NT")) {
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent())
if ($currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
return "${env:USERNAME}@$(${env:COMPUTERNAME}.ToLower())# "
} else {
return "${env:USERNAME}@$(${env:COMPUTERNAME}.ToLower())> "
return "# "
}
} elseif ($IsLinux) {
return "$(id -un)@$(hostname -s)> "
} else {
return "PS> "
}
return "> "
}
function ADUserInfo {

View file

@ -81,7 +81,7 @@ unset _flatpak_xdg_path
# Basic exports.
export HISTFILE=""
export PS1="$(id -un)@$(hostname | sed 's/\..*//')\$ "
export PS1='\$ '
export TIME_STYLE=long-iso # Used by GNU 'ls'.
# Bash-specific settings that will not work in other Bourne-compatible shells.
@ -117,8 +117,6 @@ then
bindkey "^[OA" history-beginning-search-backward-end
bindkey "^[OB" history-beginning-search-forward-end
PS1="%n@%m%# "
else
# POSIX-compatible prompt.
if [ "$(uname -s)" = FreeBSD ]