Help and docs
Sign in

grindlemire/dotfiles code browser

01-07-demo_09246a78_add_activity_feed_api 022fce1
markdown · 82 lines · 2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# dotfiles

Personal shell configuration and utility scripts

## Setup

Place this repository in `~/dotfiles` and symlink the main configuration:

```bash
ln -s ~/dotfiles/zshrc.sh ~/.zshrc
```

## Configuration Files

### Core Shell Configuration

- **`zshrc.sh`** - Main zsh configuration with aliases, functions, and shell settings
- **`zprofile.sh`** - Sources local zprofile configuration for startup scripts

### Platform-Specific

- **`macbook.sh`** - macOS-specific settings including key remapping (Caps Lock ↔ Escape, Escape ↔ Tilde)

### Utility Modules

- **`docker.sh`** - Docker and docker-compose shortcuts and utilities
- **`virtualenv.sh`** - Python virtual environment management
- **`worktree.sh`** - Git worktree utilities for managing multiple branches

## Key Features

### Aliases & Shortcuts

- `ll`, `la`, `lt`, `lla` - Enhanced ls variations
- `cap` & `check` - Capture and check exit codes
- `lc` - Count lines in Go/templ files
- `to_gif` - Convert videos to GIF format

### Git Utilities

- `gcommit [message]` - Add all and commit (auto-timestamps if no message)
- `gpush/gpull [branch]` - Push/pull current or specified branch
- `gprune` - Delete merged branches (use `--dry` for preview)
- `grevert` - Hard reset to previous commit
- `grollback` - Revert last commit
- `clone <user/repo>` - Clone from GitHub
- `git_sign_init <key>` - Setup SSH commit signing

### Docker Shortcuts

- `dssh <container>` - SSH into container
- `dexec <container> <cmd>` - Execute command in container
- `dls`, `dstart`, `dstop`, `drm` - Container management
- `dlog <container>` - Follow container logs
- `dcup`, `dcstop`, `dcrm`, `dclog` - Docker Compose equivalents

### Python Virtual Environments

- `venv` - Create/activate Python 2 virtualenv
- `venv3` - Create/activate Python 3 virtualenv
- `vend` - Deactivate and restore PYTHONPATH

### Git Worktree Management

- `wtc <branch> [path]` - Create new worktree
- `wtd [-f] <branch|path>` - Delete worktree
- `wtl` - List all worktrees

### Shell Enhancement

- Vi mode with custom cursor indicators
- Enhanced history search with ↑/↓ arrows
- Colored prompts showing user, directory, and git branch
- Terminal window title updates with current directory

### Custom Navigation

- `myip` - Show local IP address

## Environment Integration

The configuration automatically sources available modules and handles missing files gracefully. Create `local-zshrc.sh` for machine-specific settings that shouldn't be tracked in git.