Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I'm kind of used to linux. I'm using Busybox from the Busybox Free installer, with Busybox 1.21.0-Stericson. Trying to chance my shell to the Busybox shell using busybox ash gives the following error after every single command:

ash: precmd: not found
echo $PS1
$(precmd)$USER@$HOSTNAME:${PWD: -?} $ 

I tried to go back to the normal shell and find out WHERE precmd is:

which precmd

It just changes the prompt to have "1|" in front of it, without giving me WHERE it is. I found a solution here, but have no idea where to put it. I'm basically trying to do the same as this question (make Busybox shell the default).

share|improve this question
precmd is a function, and as far as I understand ash doesn't support it. –  Matthew Read Jan 30 '13 at 17:55
There was a solution here: blog.bstpierre.org/zsh-prompt as I said. I need to find out where to put the code. –  Hameer Abbasi Feb 2 '13 at 13:31

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.