Skip to content

Commit

Permalink
Update path in zprofile.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Jan 4, 2025
1 parent 750e398 commit 47d159c
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 43 deletions.
8 changes: 5 additions & 3 deletions .deepsource.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
version = 1
version = "1.0"

[[analyzers]]
name = "shell"
enabled = true

[analyzers.meta]
dialect = "zsh"
shell = "bash"

[[analyzers]]
name = "python"
28 changes: 14 additions & 14 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,18 @@ repos:
- id: trailing-whitespace
- id: mixed-line-ending

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.4
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
# - repo: https://github.com/astral-sh/ruff-pre-commit
# rev: v0.8.4
# hooks:
# - id: ruff
# args: [--fix, --exit-non-zero-on-fix]
# - id: ruff-format

- repo: https://github.com/pre-commit/mirrors-mypy
rev: 'v1.14.1'
hooks:
- id: mypy
additional_dependencies:
- types-PyYAML
- types-requests
args: [--config-file=python/mypy.ini]
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: 'v1.14.1'
# hooks:
# - id: mypy
# additional_dependencies:
# - types-PyYAML
# - types-requests
# args: [--config-file=python/mypy.ini]
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,4 @@ This setup maintains the repository structure while making all bash scripts acce

<!-- REFERENCE LINKS -->
[aggregate_docs.sh]: scripts/file/aggregate_docs.sh
[scripts]: https://github.com/eli64s/dots/tree/main/bash
[scripts]: https://github.com/eli64s/dots/tree/main/scripts
35 changes: 22 additions & 13 deletions zsh/.zprofile
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ export PYENV_ROOT="$HOME/.pyenv"
export POETRY_HOME="$HOME/.poetry"

# Add Homebrew, pyenv, and Poetry to PATH if their directories exist
if [[ -d "$PYENV_ROOT/bin" ]]; then
export PATH="$PYENV_ROOT/bin:$PATH"
fi

if [[ -d "$POETRY_HOME/bin" ]]; then
export PATH="$POETRY_HOME/bin:$PATH"
fi

# Add Homebrew's bin directory to PATH
export PATH="/opt/homebrew/bin:$PATH"

# Local binaries: Add ~/.local/bin to PATH
export PATH="$PATH:$HOME/.local/bin"
path_append() {
if [ -d "$1" ] && [[ ":$PATH:" != *":$1:"* ]]; then
PATH="$PATH:$1"
fi
}

path_append "/opt/homebrew/bin"
path_append "/opt/homebrew/sbin"
path_append "$HOME/.local/bin"
path_append "/usr/local/bin"
path_append "/usr/local/lib/docker"
path_append "/Applications/Docker.app/Contents/Resources/bin"
path_append "/opt/homebrew/bin/poetry"

# XDG Base Directory Specification
export XDG_CONFIG_HOME="$HOME/.config"
Expand All @@ -31,3 +31,12 @@ export XDG_DATA_HOME="$HOME/.local/share"
if command -v pyenv >/dev/null 2>&1; then
eval "$(pyenv init --path)"
fi

# Initialize Poetry environment variables
if [ -f "$POETRY_HOME/env" ]; then
source "$POETRY_HOME/env"
fi

# Export other environment variables if necessary
# Example:
# export NODE_ENV=production
25 changes: 13 additions & 12 deletions zsh/.zshrc
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# ~/.zshrc: Configure interactive zsh shell.
# ~/.zshrc: Configure interactive Zsh shell.

# Oh-My-Zsh configuration
export ZSH="$HOME/.oh-my-zsh"
ZSH_THEME="mgutz"
ZSH_THEME="mgutz" # Set your preferred theme

# Oh-My-Zsh plugins
plugins=(
Expand All @@ -18,9 +18,10 @@ plugins=(
# zsh-autosuggestions
)

# Source Oh-My-Zsh to enable its features and plugins
source $ZSH/oh-my-zsh.sh

# Initialize completion for Zsh
# Initialize completion system
fpath=($HOME/.zfunc $fpath)
autoload -Uz compinit
compinit
Expand All @@ -30,7 +31,7 @@ if command -v pyenv >/dev/null 2>&1; then
eval "$(pyenv init -)"
fi

# Initialize uv for package management
# Initialize uv (Assuming 'uv' is a valid command)
if command -v uv >/dev/null 2>&1; then
eval "$(uv generate-shell-completion zsh)"
fi
Expand Down Expand Up @@ -100,7 +101,7 @@ setopt hist_verify
setopt inc_append_history
setopt share_history

# FZF Configuration
# FZF configuration
export FZF_DEFAULT_OPTS="--height 40% --layout=reverse --border --preview 'cat {}'"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

Expand All @@ -121,17 +122,16 @@ if [ -f "$GCLOUD_PATH/completion.zsh.inc" ]; then
fi

# Autosuggestions Configuration
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'
# ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=8'

# Source additional tools (must be at the end)
# Uncomment to enable zsh-syntax-highlighting
# source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
source $(brew --prefix)/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

# Uncomment to enable zsh-autosuggestions
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# Uncomment if you want to enable zsh-autosuggestions
# source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh

# GitHub/Dots repository integration
# DOTS_DIR="$HOME/Documents/GitHub/dots"
# GitHub/dots symlinked scripts
# DOTS_DIR="$HOME/Projects/GitHub/dots"
# if [ -d "$DOTS_DIR/scripts" ]; then
# for script in "$DOTS_DIR/scripts"/*.sh; do
# if [ -f "$script" ] && [ -x "$script" ]; then
Expand All @@ -141,4 +141,5 @@ source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# fi

# Optional: Customize the Shell Prompt
# Uncomment and modify the following line to set a custom prompt
# PROMPT='%F{218}%1~ %F{99}$ %f'

0 comments on commit 47d159c

Please sign in to comment.