fix some overflow bugs, try to use GNU Readline Library, now only can autocomplete the first command