macOS terminal is not responding and cannot type commands
My macOS terminal is not responding and cannot type in any command after rewriting the nano file for the file or directory. I tried to rewrite the nano file as above shows.
# Conda initialization code...
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/XXX/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/Users/XXX/opt/anaconda3/etc/profile.d/conda.sh" ]; then
. "/Users/XXX/opt/anaconda3/etc/profile.d/conda.sh"
else
export PATH="/Users/XXX/opt/anaconda3/bin:$PATH"
fi
fi
unset __conda_setup
# <<< conda initialize <<<
# SDKman initialization code...
source "$HOME/.sdkman/bin/sdkman-init.sh"
--------------------------------------------------------------------------------------------------------------------------
However, I might do something wrong, once I opened a new terminal, it appeared like
--------------------------------------------------------------------------------------------------------------------------
I can type in commands but there is no response from it.
--------------------------------------------------------------------------------------------------------------------------
Whatever I type in, it keeps continuing like above.
--------------------------------------------------------------------------------------------------------------------------
I have tried to reset and terminated the terminal but nothing is working like it should be started with [name@Mac-Pro ~ %] to type in commands.
I know if there's a syntax error or incorrect modification in the shell initialization files, I can open the new terminal to check on the error, however, it's not allowing me to execute any command even though I force quit the old one and start a new terminal.
--------------------------------------------------------------------------------------------------------------------------
Please kindly help me with this, thank you so much!
MacBook Pro 13″