You need to ensure the set command syntax is correct. If you have a whitespace in your directory name, it fails. You have to protect it from that by quoting:
alias cd
set old="$cwd"; chdir !*;
سؤال
There is a certain directory, than when entered, i cannot get out anymore.
518 :cd ..
set: Syntax Error.
519 :cd
set: Syntax Error.
I get all the time the syntax error.
The name of the dir is my home dir and then .jenkins/workspace/x build/target.
For other directories it works
What can be the reason.
Can i somehow fix this directory?
There is an alias for cd
alias cd
set old=$cwd; chdir !*;
المحلول
You need to ensure the set command syntax is correct. If you have a whitespace in your directory name, it fails. You have to protect it from that by quoting:
alias cd
set old="$cwd"; chdir !*;