Skip to content

Commit 45cce65

Browse files
author
root
committed
HISTSIZE bugfix and First pass of documentation
1 parent 6e8171b commit 45cce65

File tree

15 files changed

+29
-314
lines changed

15 files changed

+29
-314
lines changed

.devcontainer/devcontainer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
}
2525
},
2626
"features": {
27-
"./features/terminalhistory": {}
27+
"./features/bash-config": {}
2828
},
2929
"runArgs": [
3030
// Allow the container to access the host X11 display and EPICS CA
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Lightweight, Configurable BASH Eternal History
2+
3+
## Defaults
4+
5+
When this feature is first called, onCreateCommand.sh is created and called in `devcontainer-feature`.
6+
This creates and installs a default bash terminal configuration from `feature_settings_rc` which contains opinionated default BASH terminal settings such as:
7+
* A minimalist, blue bash prompt.
8+
* Eternal, shared history between containers using this feature.
9+
10+
## Customisation
11+
12+
The user can specify their own terminal preferences in `$CONFIG_STAGING/bashrc`, which defaults to `/devcontainer_staging/bashrc`.
13+
Then the container is rebuilt, if `bashrc` already exists it won't be overwritten, preserving changes. If the container has been built once already, the existing bashrc must be deleted in order for your changes to be applied.
14+
15+
16+
17+
creates staging folder in container
18+
creates onCreateCommand.sh in the staging folder
19+
inputrc and bashrc are also created in the staging folder, containing incremental history searching and user customisations respectively
20+
feature_settings_rc is created in the staging fodler, which contains a PS1 setup and opinionated terminal features
21+
"onCreateCommand" is then exectuted inside the container during finalisation of container setup.
22+
- This copies the contents of feature_settings_rc into devcontainer_rc
23+
- then copies bashrc and inputrc into the container, unless they exist already to prevent overwriting user edits
24+
- then adds root permissions.
25+
A symbolic link to /root/ is created The items in the CONFIG_FOLDER
26+
our bashrc is called by /root/.bashrc

.devcontainer/features/diamond-bash-config/devcontainer-feature.json renamed to .devcontainer/features/bash-config/devcontainer-feature.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "Lightweight and configurable BASH eternal history",
33
//ID *must* match parent folder name *exactly*
4-
"id": "diamond-bash-config",
4+
"id": "bash-config",
55
"version": "1.0.0",
66
"description": "Lightweight BASH setup with eternal history and PS1 tweaks. Fully configurable.",
77
"containerEnv": {

.devcontainer/features/diamond-bash-config/install.sh renamed to .devcontainer/features/bash-config/install.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export PS1="\[\033[1;34m\]\W \[\033[0m\]# "
6363
6464
# enable enternal shared history
6565
export HISTCONTROL=ignoreboth:erasedups
66+
export HISTSIZE=-1
6667
export HISTFILESIZE=-1
6768
export SAVEHIST=-1
6869
export HISTFILE=$CONFIG_FOLDER/.bash_eternal_history

test/_global/color_and_hello.sh

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

test/_global/scenarios.json

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

test/color/gold.sh

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

test/color/green.sh

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

test/color/my_favorite_color_is_green.sh

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

test/color/scenarios.json

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

0 commit comments

Comments
 (0)