Skip to content

Commit c97f215

Browse files
authored
Allow template for inputrc to be updated and include terminal bell removal (#11)
1 parent 674df9c commit c97f215

File tree

3 files changed

+26
-10
lines changed

3 files changed

+26
-10
lines changed

Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ ENV USER_TERMINAL_CONFIG=/user-terminal-config
3535
# and add hooks to all the files we reference
3636
# This can be overridden by the user mounting a different folder over the top
3737
RUN /root/terminal-config/ensure-user-terminal-config.sh && \
38-
ln -fs $USER_TERMINAL_CONFIG/inputrc /root/.inputrc && \
3938
echo '/root/terminal-config/ensure-user-terminal-config.sh' >> /root/.bashrc && \
4039
echo 'source ${USER_TERMINAL_CONFIG}/bashrc' >> /root/.bashrc && \
4140
echo '/root/terminal-config/ensure-user-terminal-config.sh' > /root/.zshrc && \
42-
echo 'source ${USER_TERMINAL_CONFIG}/zshrc' >> /root/.zshrc
41+
echo 'source ${USER_TERMINAL_CONFIG}/zshrc' >> /root/.zshrc && \
42+
ln -fs $USER_TERMINAL_CONFIG/inputrc /root/.inputrc
4343

4444
# Install uv using the official image
4545
# See https://docs.astral.sh/uv/guides/integration/docker/#installing-uv

terminal-config/inputrc-default

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Readline configuration for bash shell.
2+
3+
# Incremental history searching with up and down arrows (C-P and C-N for old
4+
# style navigation).
5+
"\e[A": history-search-backward
6+
"\e[B": history-search-forward
7+
8+
# Control left and right for word movement
9+
"\e[5C": forward-word
10+
"\e[5D": backward-word
11+
12+
# Disable terminal bell, then set to visible if available
13+
set bell-style none
14+
set bell-style visible

terminal-config/inputrc-template

100755100644
Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# Readline configuration for bash shell.
1+
# This inputrc will be linked as /root/.inputrc and used in every terminal launch
2+
# in a devcontainer that uses the ubuntu-devcontainer as a base
3+
# https://github.com/DiamondLightSource/ubuntu-devcontainer
24

3-
# Incremental history searching with up and down arrows (C-P and C-N for old
4-
# style navigation).
5-
"\e[A": history-search-backward
6-
"\e[B": history-search-forward
5+
# This file is initialized by the devcontainer, but you are then free to edit it
76

8-
# Control left and right for word movement
9-
"\e[5C": forward-word
10-
"\e[5D": backward-word
7+
# Execute default, opinionated settings:
8+
# https://github.com/DiamondLightSource/ubuntu-devcontainer/blob/main/terminal-config/inputrc-default
9+
# delete this line to remove defaults
10+
$include ~/terminal-config/inputrc-default
11+
12+
# add your override settings for every shell below

0 commit comments

Comments
 (0)