If you must know, there is an awesome small utility that tremendously helps you to jump between directories in terminal. It’s called autojump and works with both bash and zsh. Basically, it learns which directories you stay at most time and suggests them when you type the first letters and press Tab. An extremely useful tool indeed. You should definitely check it out if you haven’t yet.
A few days ago, it stopped working spitting out the following exception every time I tried to tun it:
1 2 3 4 5 6 7 8 9 10 11 12
Hmm, weird. Skimming through package manager’s logs didn’t reveal any updates of either autojump or python. Having converted the position 3265 to hex (
1 2 3 4
), I went to check what is the symbol there in
~/.local/share/autojump file with
xxd. There were first Russian symbols in the position. autojump had never had any problems with paths containing Russian letters. What had happened?
I ran zsh, and autojump worked fine there! Just to be sure, python was of the same version, as was the data file with jumps history. I ran
env to check the environment variables, the last but one line was about LC_CTYPE var. It struck me that moment that one day before there had been updates to the main Arch Linux’s
/etc/rc.conf file, where most settings had been deleted. I know this because after every update I check the updates in the
/etc/ dir with git.
So, the problem must be with locale.
echo $LANG prints
C, which is wrong. Apparently, that update removed the line setting system locale, and didn’t set in any other way. Quick check:
export LANG=en_US.UTF-8, and autojump works again!
According to Arch wiki, to set the system locale you need to use
1 2 3 4 5 6 7 8 9 10