fixed bash prompt hack: now it ignores rc (thanks, straintcmp)
This commit is contained in:
parent
64f673c00b
commit
c76d7b350e
8
demo.sh
8
demo.sh
@ -45,10 +45,10 @@ function wait()
|
||||
function prompt()
|
||||
{
|
||||
invalidcmd="somethingthatshouldbetotallynotacommandinanygivenenvironment"
|
||||
expPS1=$(echo $invalidcmd |
|
||||
bash -i 2>&1 |
|
||||
grep $invalidcmd |
|
||||
head -n 1 |
|
||||
expPS1=$(echo $invalidcmd |
|
||||
bash --norc -i 2>&1 |
|
||||
grep $invalidcmd |
|
||||
head -n 1 |
|
||||
sed "s/$invalidcmd//g")
|
||||
printf "$expPS1"
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user