so one thing that really bugged me about the linux cd was if i had lets say this in folder temp:
download_files (which is a directory)
and did cd * it would say something like bash: cd: a.out: Not a directory. so i was thinking of implementing an ls like thing where it tests if its a dir before trying to cd to it. i did some research and found that cd is a part of the terminal, so i was wondering would it be possible to get the source and do that? im not new to linux but i havent delved to deep into the development of it to know how viable an option that is
Suppose that you've got several directories, ¿what do you expect `cd *' to do?
go to the first directory. its nothing life changing. just a small hack
¿how it would be different on what already does?
if you try do `cd main.cpp' it fails gracefully.
it doesnt. it tries to move to that dir and if it can it will. what my code would do is iterate through the files in the dir specified until it finds a sub dir and switches to it, and if it doesnt find one give an error
FYI, */ would match the directories
thanks didnt know that. sounds like what i was trying to implement