ユーザーが cd folder と入力した場合 - プログラムは指定されたフォルダに移動します。特に以下のケースに対応する必要があります:
If the folder is .. - it means that the program should move to the parent directory. So, if we’re at directory /usr/local/bin/, the program should move to /usr/local/.
If the folder is . - it means that the program should stay in the current directory.
If the folder starts with /, it means that the program should change the absolute path of the directory - not the relative. So, if we’re at directory /usr/local/bin/, and the input was cd /dev, the program should move to /dev/.
If the folder is a name (Latin letters or numbers) - the program should move to that directory relative to the current one. So, if we’re at directory /usr/local/bin/, and the input was cd ../lib, the program should move to /usr/local/lib/.