Skip to content

Commit 8a3dff2

Browse files
author
Richard Cunningham
committed
Initial commit
1 parent 67a45f0 commit 8a3dff2

File tree

7 files changed

+66
-150
lines changed

7 files changed

+66
-150
lines changed

src/color/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/color/devcontainer-feature.json

Lines changed: 0 additions & 21 deletions
This file was deleted.

src/color/install.sh

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/devcontainer-rc/install.sh

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
#!/bin/bash
2+
3+
mkdir -p $CONFIG_STAGING
4+
5+
# -------------------------------------------------------------------------------
6+
cat > $CONFIG_STAGING/onCreateCommand.sh \
7+
<< EOF
8+
#!/bin/bash
9+
10+
# copy in the opinionated default settings from the feature
11+
cp $CONFIG_STAGING/feature_settings_rc $CONFIG_FOLDER/feature_settings_rc
12+
13+
# copy in the user editable settings unless they already exist
14+
if [[ ! -f $CONFIG_FOLDER/bashrc ]] ; then
15+
cp $CONFIG_STAGING/bashrc $CONFIG_FOLDER
16+
cp $CONFIG_STAGING/inputrc $CONFIG_FOLDER
17+
fi
18+
19+
# hook in the config to the root account
20+
ln -s $CONFIG_FOLDER/inputrc /root/.inputrc
21+
echo "source $CONFIG_FOLDER/bashrc" >> /root/.bashrc
22+
EOF
23+
24+
# -------------------------------------------------------------------------------
25+
cat > $CONFIG_STAGING/inputrc \
26+
<< EOF
27+
# Readline configuration for bash shell.
28+
29+
# Incremental history searching with up and down arrows (C-P and C-N for old
30+
# style navigation).
31+
"\e[A": history-search-backward
32+
"\e[B": history-search-forward
33+
34+
# Control left and right for word movement
35+
"\e[5C": forward-word
36+
"\e[5D": backward-word
37+
EOF
38+
39+
# -------------------------------------------------------------------------------
40+
cat > $CONFIG_STAGING/bashrc \
41+
<< EOF
42+
#!/bin/bash
43+
44+
# execute default opinionated settings - delete this line to remove defaults
45+
source $CONFIG_FOLDER/feature_settings_rc
46+
47+
# add your personal custom settings below
48+
EOF
49+
50+
# -------------------------------------------------------------------------------
51+
cat > $CONFIG_STAGING/feature_settings_rc \
52+
<< EOF
53+
#!/bin/bash
54+
55+
# default opinioned bash configuration
56+
57+
# set the prompt
58+
export PS1="\[\033[1;34m\]\W \[\033[0m\]# "
59+
60+
# enable enternal shared history
61+
export HISTCONTROL=ignoreboth:erasedups
62+
export HISTFILESIZE=-1
63+
export SAVEHIST=-1
64+
export HISTFILE=$CONFIG_FOLDER/.bash_eternal_history
65+
PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
66+
EOF

src/hello/README.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

src/hello/devcontainer-feature.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/hello/install.sh

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)