Skip to content

Commit

Permalink
Merge pull request #11 from braun-daniel/feature/fzf
Browse files Browse the repository at this point in the history
Finalized fzf and spaceship
  • Loading branch information
braun-daniel authored Oct 11, 2024
2 parents 9a7b72a + c3c5cb7 commit dbf389c
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
9 changes: 7 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,13 @@
}
},
"features": {
"ghcr.io/devcontainers/features/docker-in-docker:2": {}
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
"ghcr.io/braun-daniel/devcontainer-features/fzf:1": {},
"ghcr.io/braun-daniel/devcontainer-features/spaceship:1": {}
},
"remoteUser": "node",
"updateContentCommand": "npm install -g @devcontainers/cli"
"updateContentCommand": "npm install -g @devcontainers/cli",
"containerEnv": {
"SHELL": "/bin/zsh"
}
}
2 changes: 1 addition & 1 deletion src/fzf/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "fzf",
"id": "fzf",
"version": "0.0.3",
"version": "1.0.0",
"description": "Installs fzf - a command line fuzzy search.",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
Expand Down
3 changes: 2 additions & 1 deletion src/fzf/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@ echo "Installing git and wget..."
apt-get update
apt-get install -y git wget

# Install fzf as the remote user
# Prepare variables
_REMOTE_USER=${_REMOTE_USER:-"root"}
_REMOTE_USER_HOME=$(eval echo "~${_REMOTE_USER}")

# Install fzf
su - "$_REMOTE_USER" -c "git clone --depth 1 https://github.com/junegunn/fzf.git ${_REMOTE_USER_HOME}/.fzf"
su - "$_REMOTE_USER" -c "${_REMOTE_USER_HOME}/.fzf/install --all"
2 changes: 1 addition & 1 deletion src/spaceship/devcontainer-feature.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Spaceship",
"id": "spaceship",
"version": "0.0.3",
"version": "1.0.0",
"description": "Installs spaceship-prompt.",
"installsAfter": [
"ghcr.io/devcontainers/features/common-utils"
Expand Down
6 changes: 3 additions & 3 deletions src/spaceship/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ echo "Installing dependencies..."
apt-get update
apt-get install -y zsh git

# Use ZSH as default shell
echo "Permanently changing shell to ZSH..."
chsh -s "$(which zsh)"
# Prepare variables
_REMOTE_USER=${_REMOTE_USER:-"root"}
_REMOTE_USER_HOME=$(eval echo "~${_REMOTE_USER}")

# Install spaceship-prompt
su - "$_REMOTE_USER" -c "mkdir -p ${_REMOTE_USER_HOME}/.zsh"
Expand Down

0 comments on commit dbf389c

Please sign in to comment.