0

I am using a singularity container created from a docker ubuntu:xenial base image. When I get into the shell using this command -

singularity shell --bind /path/to/inputs:/mnt3,/path/to/outputs:/mnt2 /singularity_docker_xenial_image.img

1) the tab completion does not work 2) arrow keys produce strange characters

For example typing ls[tab][up][down][left][right] produces this -

singularity_docker_xenial_image.img> $ ls   ^[[A^[[B^[[D^[[C

Does anybody know 1) why tab completion doesn't work and 2) why the strange characters are produced?

Thanks

Durai Arasan
  • 123
  • 5

1 Answers1

0

you must install singularity with the following commands:

git clone https://github.com/singularityware/singularity.git

cd singularity

git fetch --all

git checkout 2.6.0

./autogen.sh

./configure --prefix=/usr/local --sysconfdir=/etc

make

sudo make install
  1. tap competition

    if you install singularity without --sysconfdir parameter, The completion script can not be installed for all users. If you omit the --sysconfdir option , the configuration file will be installed in /usr/local/etc

  2. strange characters

    check if the default shell is working fine

    echo $SHELL

the values ​​can be /bin/bash or /bin/sh, or at least they are the most common.

check the user's shell, outside the container, because these values ​​are passed when the container is displayed.

Now, terminal represents the raw keycode of the keys sent to it by the keyboard, and shell would normally intercept the keypress; but for some reason they are directly printing the value of the modifier keys.

from the bash manual for special characters, what does ^[[A mean?

\[ begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt

terminal control sequence refiere to special keys ( Ctrl, Alt, Win, ... ) modifiers. In other words, ANSI escape codes. then ^[[A^[[B^[[D^[[C are cursor-down, cursor-up, cursor-left, cursor-right and these are shown because you combine the cursor keys with modifier keys.

At this point I can not give you a clear solution for lack of detail in the information you provide.

al3x609
  • 173
  • 1
  • 10