Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard Cunningham committed Nov 19, 2024
1 parent 67a45f0 commit 8a3dff2
Show file tree
Hide file tree
Showing 7 changed files with 66 additions and 150 deletions.
26 changes: 0 additions & 26 deletions src/color/README.md

This file was deleted.

21 changes: 0 additions & 21 deletions src/color/devcontainer-feature.json

This file was deleted.

26 changes: 0 additions & 26 deletions src/color/install.sh

This file was deleted.

66 changes: 66 additions & 0 deletions src/devcontainer-rc/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/bin/bash

mkdir -p $CONFIG_STAGING

# -------------------------------------------------------------------------------
cat > $CONFIG_STAGING/onCreateCommand.sh \
<< EOF
#!/bin/bash
# copy in the opinionated default settings from the feature
cp $CONFIG_STAGING/feature_settings_rc $CONFIG_FOLDER/feature_settings_rc
# copy in the user editable settings unless they already exist
if [[ ! -f $CONFIG_FOLDER/bashrc ]] ; then
cp $CONFIG_STAGING/bashrc $CONFIG_FOLDER
cp $CONFIG_STAGING/inputrc $CONFIG_FOLDER
fi
# hook in the config to the root account
ln -s $CONFIG_FOLDER/inputrc /root/.inputrc
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc
EOF

# -------------------------------------------------------------------------------
cat > $CONFIG_STAGING/inputrc \
<< EOF
# 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
EOF

# -------------------------------------------------------------------------------
cat > $CONFIG_STAGING/bashrc \
<< EOF
#!/bin/bash
# execute default opinionated settings - delete this line to remove defaults
source $CONFIG_FOLDER/feature_settings_rc
# add your personal custom settings below
EOF

# -------------------------------------------------------------------------------
cat > $CONFIG_STAGING/feature_settings_rc \
<< EOF
#!/bin/bash
# default opinioned bash configuration
# set the prompt
export PS1="\[\033[1;34m\]\W \[\033[0m\]# "
# enable enternal shared history
export HISTCONTROL=ignoreboth:erasedups
export HISTFILESIZE=-1
export SAVEHIST=-1
export HISTFILE=$CONFIG_FOLDER/.bash_eternal_history
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
EOF
26 changes: 0 additions & 26 deletions src/hello/README.md

This file was deleted.

22 changes: 0 additions & 22 deletions src/hello/devcontainer-feature.json

This file was deleted.

29 changes: 0 additions & 29 deletions src/hello/install.sh

This file was deleted.

0 comments on commit 8a3dff2

Please sign in to comment.