[Ubuntu] When the Character(s) are Repeated with Tab Autocompletion, Fix the Locale

less than 1 minute read

This article introduces a solution when character duplication occurs when one types tab for completion. For me, This usually occurs when I run a docker Ubuntu image in which locale is not configured.

In docker container:

$ sudo apt-get update
$ sudo apt-get install locales
$ locale-gen en_US.UTF-8
$ dpkg-reconfigure locales

select en\_US.UTF-8 UTF-8

$ dpkg-reconfigure keyboard-configuration
$ localedef -i en_US -c -f UTF-8 en_US.UTF-8

commit the image (example):

$ docker commit -a "Junyong Lee" -m "tf1.10.0" junyonglee_tf codeslake/tensorflow-1.10.0:latest

When you run the image, run with option -e LNAG=en_US.UTF-8:

$ nvidia-docker run --privileged -it -v /home/junyonglee:/root -v /Jarvis:/root/Jarvis -v /Mango:/Mango -v /Mango:/root/Mango -p 7001-7004:7001-7004 -e LNAG=en_US.UTF-8 --name junyonglee_tf --rm codeslake/tensorflow-1.8.0:latest /bin/zsh

Leave a Comment