Fix the bugs of ctrl-c, fg and bg, complete cd