Thanks Meter 41
Join Date: Mar 2006
Location: Silly-con Valley
Originally Posted by bilclintonsdaman
i want to alias ls='ls --color=always'. is there something like a .bashrc file for busybox sh?
Just had a look at the busybox source and it says it uses the contents of environment variable ENV as a startup script so you could do
and it'll read /system/sd/.bashrc
for your startup commands. Altrernatively, if you invoke it as a login shell (ash -l
), it'll source /etc/profile
from the current directory so if you create /system/sd/.profile
to contain alias ls='ls --color=always'
then as long as you do this
you'll have your alias (I just tried this with JF1.51 and it worked great).
I also saw that it will record command history to the file named in HISTFILE so you may want to make your startup script look like this
alias ls='ls --color=always'
Also, keep in mind that this isn't bash -- you need to use ash shell scripting semantics.