This sounds like a bad copy paste into a shell profile script.
As @slm indicated, '
[ ' is the usual escape sequence, but you're saying you have '
['. When I look through my terminal emulator's escape codes, I don't see any codes which are ESC followed by 2 brackets.
Since an ESC is a non-printable character, it is often represented in text editors as
^[. I'm guessing someone was editing a profile script which had this escape code, and tried to copy/paste it onto another system. But they copied the visual representation of ESC (
^[) instead of the ESC itself.
However this would result in just seeing
^[[[D. For this, maybe the copy/paste was done by typing it instead, and it's a typo.
In any case, to fix this, you'll need to find the profile script which has this and fix it. If using bash, try the following:
fgrep -r '[[[' /etc/bashrc /etc/bashrc.d /etc/bash_profile /etc/profile /etc/profile.d ~/.profile ~/.bashrc ~/.bash_profile
Once you've found it, it's easy to fix. In the
vi editor, just delete the
^[[ characters and in insert mode do Ctrl + v then ESC. This will insert a literal ESC character.
[characters, not 2?