Tiny Core Linux
Tiny Core Base => TCB Q&A Forum => Topic started by: aus9 on April 21, 2013, 04:25:52 AM
-
Hi
I am reluctant to call it a bug, but I find it equally bugging me so thought I would report it in case its fixable.
I can easily reproduce it.
In terminal I define a variable, lets call it
SRC=cups-1.6.2
If I forget to define it, and its real pathway is /tmp/cups-1.6.2
and I am currently in /tmp
cd $SRC
kicks me back into either home folder for the user
eg for root
root@box:/tmp# pwd
/tmp
root@box:/tmp# cd $SRC
root@box:~# pwd
/root
for tc
tc@box:/tmp$ pwd
/tmp
tc@box:/tmp$ cd $SRC
tc@box:~$ pwd
/home/tc
I know the primary error is the idiot typing at the moment
###########
FEATURE request
###########
Any chance of some kind of feature request to stop the kick back into the relevant home folder?
thanks for reading
-
If $SRC is empty then cd is executed with no arguments. And when cd is executed without arguments the user is returned to the home directory.
It is normal behavior, not bug.
-
Any chance of some kind of feature request to stop the kick back into the relevant home folder?
$ cd ${SRC?Error}
This gives you an error if $SCR variable is not defined and lets you where you are at.
-
AmatCoder
Thanks for the quick reply, I thought that might be the case but doesn't hurt to ask eh?
marked as solved
-
$ cd ${SRC?Error}
This gives you an error if $SCR variable is not defined and lets you where you are at.
Adding this to my growing IUSILFTF list. Thank you.
"Incredibly Useful S(tuff) I've Learned From These Forums"