Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: cjgau on January 07, 2009, 10:16:31 AM
-
Hi,
Hope this is the place for a newbie's question.
I like to use the aliases ll and la in the .profile, but didn't know how to enable it.
TIA, TC is a clean and wonderful distro!
-
You can set the ENV variable. For more info, see http://forum.tinycorelinux.net/index.php?topic=196.0
Currently, aliases in .profile will be available only on a VT console.
-
Thank you, hats.
For now I just use your code "aterm -e sh --login" saved in Home directory, and double clicks from emelfn2.
Thanks again for your prompt response.
-
Robert and Team, I would suggest that by default TC would move its alias definition to a ~/.ashrc file and include this also from ~/.profile. This would allow to have same aliases in both the initial login shell and the non-login shells.
Here's an extract of my ~/.profile:
if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
else
export ENV="$HOME/.ashrc"
if [ -f "$HOME/.ashrc" ]; then
. "$HOME/.ashrc"
fi
fi
-
Good suggestion florian, will implement.
-
Is checking for those bash specifics needed? Usually the regular user profile in .bash_profile for bash is used anyways. (perhaps the bash extension should include one if it doesn't)
Also, just to change a bit, having setting ENV inside the if statement might be better:
if [ -f "$HOME/.ashrc" ]; then
export ENV="$HOME/.ashrc"
. "$HOME/.ashrc"
fi
-
yes ^thehatsrule^, it's better how you wrote it for TC. My own .profile has bash stuff because I usually I keep only one home directory for several distros.
One more detail: i see there are by default in TC some alias for mv (to mv -i) and rm (to rm -i). For similar safety reason, I would suggest to also alias cp to cp -i.
-
One more detail: i see there are by default in TC some alias for mv (to mv -i) and rm (to rm -i). For similar safety reason, I would suggest to also alias cp to cp -i.
before you do that, i'd make the existing aliases (aliasi?) do what they're intended to:
echo "" > tmpy
echo "" > tmpz
mv tmpy tmpz
does not show any presence of -i that i know of.
-
One more detail: i see there are by default in TC some alias for mv (to mv -i) and rm (to rm -i). For similar safety reason, I would suggest to also alias cp to cp -i.
before you do that, i'd make the existing aliases (aliasi?) do what they're intended to:
echo "" > tmpy
echo "" > tmpz
mv tmpy tmpz
does not show any presence of -i that i know of.
See the 2nd post in this thread.
-
See the 2nd post in this thread.
oic... well spotted. yes in the vt, they appear to be there. since i use the vt sometimes, i'll know i have the option for safer commands without issuing -i to them, thanks.
-
Thanks guys. Implemented .ashrc in TC 1.1 Alias definitions now work as expected. No more need to modify .jwmrc aterm shell calls. I agree with hats, the bash part should be implemented in the bash extension.
-
I will look into what needs to be done for the bash extension as for as .bash_profile is concerned and add it.