Skip to content

Commit

Permalink
Merge pull request #53 from Avivbens/support-dpdm
Browse files Browse the repository at this point in the history
  • Loading branch information
Avivbens authored Mar 3, 2024
2 parents 8aa4721 + c6161fc commit dc38390
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 28 deletions.
9 changes: 9 additions & 0 deletions src/commands/install/config/apps-groups/node.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,19 @@ export const NODE_APPS: Readonly<IAppSetup[]> = [
},
{
name: 'npmrc',
description: 'manage multiple .npmrc files effortlessly',
group: 'node',
tags: ['engineering', 'devops'],
commands: () => [NODE_GLOBAL('npmrc')],
},
{
name: 'DPDM',
description:
'A robust static dependency analyzer for your JavaScript and TypeScript projects',
group: 'node',
tags: ['engineering'],
commands: () => [NODE_GLOBAL('dpdm')],
},
{
name: 'verdaccio',
group: 'node',
Expand Down
17 changes: 14 additions & 3 deletions src/commands/install/config/apps-groups/terminal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,20 @@ export const TERMINAL_APPS: Readonly<IAppSetup[]> = [
group: 'terminal',
tags: ['engineering', 'devops'],
commands: () => [
'rm -rf "$HOME/.zsh/zsh-autosuggestions" && git clone https://github.com/zsh-users/zsh-autosuggestions "$HOME/.zsh/zsh-autosuggestions"',
'rm -rf "$HOME/.zsh/zsh-completions" && git clone https://github.com/zsh-users/zsh-completions.git "$HOME/.zsh/zsh-completions"',
'rm -rf "$HOME/.zsh/zsh-syntax-highlighting" && git clone https://github.com/zsh-users/zsh-syntax-highlighting.git "$HOME/.zsh/zsh-syntax-highlighting"',
BREW_INSTALL('zsh-autosuggestions'),
BREW_INSTALL('zsh-syntax-highlighting'),
BREW_INSTALL('zsh-completions'),
`chmod go-w "$(brew --prefix)/share"`,
`chmod -R go-w "$(brew --prefix)/share/zsh"`,
],
fallbackCommands: () => [
BROW_INSTALL('zsh-autosuggestions'),
BROW_INSTALL('zsh-syntax-highlighting'),
BROW_INSTALL('zsh-completions'),
`chmod go-w "$(brew --prefix)/share"`,
`chmod -R go-w "$(brew --prefix)/share/zsh"`,
`chmod go-w "$(${BROW_ALIAS} --prefix)/share"`,
`chmod -R go-w "$(${BROW_ALIAS} --prefix)/share/zsh"`,
],
},
] as const
5 changes: 5 additions & 0 deletions src/commands/shell/config/shell-modules.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ export const SHELL_MODULES_OPTIONS: IShellModule[] = [
path: `${EXTENDS_MODULES_DIR_PATH}/.zshrc.extends.vscode.sh`,
description: 'VSCode aliases and functions',
},
{
name: 'Theme',
path: `${EXTENDS_MODULES_DIR_PATH}/.zshrc.extends.theme.sh`,
description: 'Theme for the terminal, showing the current branch and more',
},
{
name: 'NPM',
path: `${EXTENDS_MODULES_DIR_PATH}/.zshrc.extends.npm.sh`,
Expand Down
31 changes: 6 additions & 25 deletions zsh/.entry-point.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@ sourceIf "$(brew --prefix)/share/google-cloud-sdk/completion.zsh.inc"


# Autosuggest
# git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
sourceIf "$HOME/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh"
sourceIf "$(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
sourceIf "$(brow --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh"


# Autocomplete
# git clone https://github.com/zsh-users/zsh-completions.git ~/.zsh/zsh-completions
fpath=($HOME/.zsh/zsh-completions/src $fpath)
FPATH=$(brew --prefix)/share/zsh-completions:$FPATH
FPATH=$(brow --prefix)/share/zsh-completions:$FPATH
# rm -f ~/.zcompdump


Expand All @@ -59,9 +59,8 @@ compinit


# Colored correct code
# git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.zsh/zsh-syntax-highlighting
sourceIf "$HOME/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"

sourceIf "$(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
sourceIf "$(brow --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"

# setopt hist_ignore_all_dups # remove older duplicate entries from history
# setopt hist_reduce_blanks # remove superfluous blanks from history items
Expand Down Expand Up @@ -130,19 +129,6 @@ autoload -U add-zsh-hook
add-zsh-hook -Uz chpwd (){ ls; }


# branches
# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }

# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '(%b)'

# Set up the prompt (with git branch name)
setopt PROMPT_SUBST
PROMPT='%F{yellow}%(4~|.../%3~|%~) %F{red}: ${vcs_info_msg_0_} %F{reset_color}$ '


# github-copilot-cli alias setup
if command -v github-copilot-cli &> /dev/null
then
Expand All @@ -153,10 +139,5 @@ fi
alias reload="exec /bin/zsh"


# docker
# show all logs
export DOCKER_BUILDKIT=0


# extend
sourceIf "$HOME/shell-config/zsh/.zshrc.extends.sh"
14 changes: 14 additions & 0 deletions zsh/extends/.zshrc.extends.theme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#! /usr/bin/env zsh

echo "extends.theme.sh loaded"

# Load version control information
autoload -Uz vcs_info
precmd() { vcs_info }

# Format the vcs_info_msg_0_ variable
zstyle ':vcs_info:git:*' formats '(%b)'

# Set up the prompt (with git branch name)
setopt PROMPT_SUBST
PROMPT='%F{yellow}%(4~|.../%3~|%~) %F{red}: ${vcs_info_msg_0_} %F{reset_color}$ '

0 comments on commit dc38390

Please sign in to comment.