pablo-lamtenzan / miniShell

Implementing (most of) Bash from scracth, supports term-caps, expansion, job control and conditionals.
0 stars 0 forks source link

Builtin cd issues #14

Closed pablo-lamtenzan closed 3 years ago

pablo-lamtenzan commented 3 years ago

1) Must display properly an attempt to change to a no directory target and return a non-zero integer.

$ touch a ; cd a

2) Must return a non-zero value when cd attempts to access to a forbidden directory .

$ mkdir -m 0 ; cd

3) Must return a non zero value if attempts to change to a not existing directory

$ rm-rf dir ; cd dir

4) Must be able to move to the root (not complete sure)

$ cd ./

5) In this example the var OLDPWD has the wrong value:

$ mkdir dir/dir ; cd dir ; cd dir ; env | grep OLDPWD

6) Must be able to go back (not complete sure)

$ cd /

pablo-lamtenzan commented 3 years ago

I wrote some trash here: go back is cd - and cd ./ seems not do nothing in bash. The rest seems right

pablo-lamtenzan commented 3 years ago

All fixed, now cd supports all the previous issues.