diff --git a/Dockerfile b/Dockerfile index 898f91b..7e9519f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,11 +29,11 @@ ENV USER_TERMINAL_CONFIG=/user-terminal-config # and add hooks to all the files we reference # This can be overridden by the user mounting a different folder over the top RUN /root/terminal-config/ensure-user-terminal-config.sh && \ - ln -fs $USER_TERMINAL_CONFIG/inputrc /root/.inputrc && \ echo '/root/terminal-config/ensure-user-terminal-config.sh' >> /root/.bashrc && \ echo 'source ${USER_TERMINAL_CONFIG}/bashrc' >> /root/.bashrc && \ echo '/root/terminal-config/ensure-user-terminal-config.sh' > /root/.zshrc && \ - echo 'source ${USER_TERMINAL_CONFIG}/zshrc' >> /root/.zshrc + echo 'source ${USER_TERMINAL_CONFIG}/zshrc' >> /root/.zshrc && \ + ln -fs $USER_TERMINAL_CONFIG/inputrc /root/.inputrc # Install uv using the official image # See https://docs.astral.sh/uv/guides/integration/docker/#installing-uv diff --git a/terminal-config/inputrc-default b/terminal-config/inputrc-default new file mode 100755 index 0000000..5af9cfb --- /dev/null +++ b/terminal-config/inputrc-default @@ -0,0 +1,14 @@ +# Readline configuration for bash shell. + +# Incremental history searching with up and down arrows (C-P and C-N for old +# style navigation). +"\e[A": history-search-backward +"\e[B": history-search-forward + +# Control left and right for word movement +"\e[5C": forward-word +"\e[5D": backward-word + +# Disable terminal bell, then set to visible if available +set bell-style none +set bell-style visible diff --git a/terminal-config/inputrc-template b/terminal-config/inputrc-template old mode 100755 new mode 100644 index 1f58a0c..3163a7d --- a/terminal-config/inputrc-template +++ b/terminal-config/inputrc-template @@ -1,10 +1,12 @@ -# Readline configuration for bash shell. +# This inputrc will be linked as /root/.inputrc and used in every terminal launch +# in a devcontainer that uses the ubuntu-devcontainer as a base +# https://github.com/DiamondLightSource/ubuntu-devcontainer -# Incremental history searching with up and down arrows (C-P and C-N for old -# style navigation). -"\e[A": history-search-backward -"\e[B": history-search-forward +# This file is initialized by the devcontainer, but you are then free to edit it -# Control left and right for word movement -"\e[5C": forward-word -"\e[5D": backward-word +# Execute default, opinionated settings: +# https://github.com/DiamondLightSource/ubuntu-devcontainer/blob/main/terminal-config/inputrc-default +# delete this line to remove defaults +$include ~/terminal-config/inputrc-default + +# add your override settings for every shell below