Suppress error when /dev/shm/prompt_msg does not exist

This commit is contained in:
lhark 2016-10-11 06:52:41 +02:00
parent b5958036c4
commit 56c6155640

View file

@ -158,7 +158,7 @@ space_sh_git_prompt () {
}
prompt_msg () {
line=$(tail -1 /dev/shm/prompt_msg)
line=$(tail -1 /dev/shm/prompt_msg) 2> /dev/null
case $line in
update_rc)
msg="Update ready for rc. Run uprc to proceed";;
@ -174,7 +174,7 @@ prompt_msg () {
esac
# Remove last message from stack before it drives us mad
sed -i '$ d' /dev/shm/prompt_msg
sed -i '$ d' /dev/shm/prompt_msg 2> /dev/null
echo $msg
}