mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-02 01:18:08 +01:00
Merge pull request #433 from Googulator/better-early-bash-prompt
Improve pseudo-interactive prompts using the early bash
This commit is contained in:
commit
f237d67b47
2 changed files with 4 additions and 3 deletions
|
|
@ -451,8 +451,9 @@ FILE *start_script(int id, int bash_build) {
|
|||
if (bash_build != 1) {
|
||||
fputs("set -E\ntrap 'env PS1=\"[TRAP] \\w # \" bash -i' ERR\n", out);
|
||||
} else {
|
||||
fputs("set -E\ntrap 'bash -c '\"'\"'while true; do printf \""
|
||||
"[TRAP - use Ctrl+D] $(pwd) # \"; $(cat); done'\"'\"'' ERR\n",
|
||||
/* FIXME early bash has buggy ERR trap handling */
|
||||
fputs("set -e\ntrap 'bash -c '\"'\"'while true; do printf \""
|
||||
"[TRAP - use Ctrl+D] $(pwd) # \"; eval \"$(cat)\"; done'\"'\"'' EXIT\n",
|
||||
out);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -7,5 +7,5 @@
|
|||
if bash --version | grep -q 'GPLv3'; then
|
||||
env - PATH=${PREFIX}/bin PS1="\w # " openvt -- bash -i
|
||||
else
|
||||
bash -c 'while true; do printf "[early Bash - use Ctrl+D] $(pwd) # "; $(cat /dev/tty2); done' &> /dev/tty2 &
|
||||
bash -c 'while true; do printf "[early Bash - use Ctrl+D] $(pwd) # "; eval "$(cat /dev/tty2)"; done' &> /dev/tty2 &
|
||||
fi
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue