> i have been working on replaced source code for type > and cd command
Not sure if I got this right. You are trying to re-implement the "type" and "cd" commands? Neither of those are commands - they are shell builtins. The way these builtins work, they *have* to be part of the shell. They cannot be implemented as separate commands. There's been some mixup somewhere. Venky.