ComputationalRadiationPhysics / picongpu

Performance-Portable Particle-in-Cell Simulations for the Exascale Era :sparkles:
https://picongpu.readthedocs.io
Other
696 stars 218 forks source link

picongpu-completion.bash fails in screen session #4954

Open PrometheusPi opened 3 months ago

PrometheusPi commented 3 months ago

When using pic-create auto-completion in a screen session, the auto-completion fails with a:

bash: _init_completion: command not found

error. Outside the screen session, the same workflow works.

finnolec commented 3 months ago

For me it works...

PrometheusPi commented 3 months ago

offline investigation with @finnolec: Auto-completion of flags provided by pic-build still works for me.

PrometheusPi commented 3 months ago

found by @finnolec: When sourcing the system bash_completion via:

source /usr/share/bash-completion/bash_completion

everything works as expected.

finnolec commented 3 months ago

This here

if [ -f /etc/bash_completion ]; then
    . /etc/bash_completion
elif [ -f /usr/share/bash-completion/bash_completion ]; then
    . /usr/share/bash-completion/bash_completion
fi

should work more reliable in case the bash_completion file is in a different directory. The /usr/share/bash-completion/bash_completion path should work on hemera :) You can add this part to your .bashrc