U:prompt.sh prevent Termux usage for (can't grep /etc/passwd)
This commit is contained in:
parent
62440de555
commit
6174dab139
1 changed files with 6 additions and 1 deletions
|
@ -20,7 +20,10 @@ p_start() {
|
|||
}
|
||||
|
||||
p_user() {
|
||||
user=$(grep $USER /etc/passwd | cut -d: -f5)
|
||||
if [ -z $TERMUX_VERSION ]
|
||||
then
|
||||
user=$(grep $USER /etc/passwd | cut -d: -f5)
|
||||
fi
|
||||
if [ -z $user ]
|
||||
then
|
||||
echo -e "${bg_orange}${fg_noir}\u"
|
||||
|
@ -61,5 +64,7 @@ p_input() {
|
|||
|
||||
PROMPT_COMMAND="p_geterr"
|
||||
|
||||
|
||||
echo debug
|
||||
PS1="$(p_start)$(p_user) \$(p_path) \w \$(p_date) \$(p_err)\$(p_end)\n$(p_input) "
|
||||
PS2="$(p_input)"
|
||||
|
|
Loading…
Reference in a new issue