Skip to content

Conversation

@hyperpolymath
Copy link
Owner

No description provided.

Replace vague documentation with concrete information:
- Add "Deliverable" section defining what Modshells does
- Add "Current Status" summary showing working vs stub features
- Split "Development Status" into "Working Now" vs "Not Yet Implemented"
- Update "Usage" section to distinguish current functionality (v0.0)
  from planned functionality (v0.1+)
- Improve directory structure descriptions
Implement all previously stubbed features:

Shell detection (shell_manager.adb):
- Check /usr/bin, /bin, /usr/local/bin, /opt/homebrew/bin for binaries
- Map each Shell_Type to its binary name (bash, zsh, nu, etc.)
- Return accurate Installed/Not_Installed status

Config file backup (Create_Backup):
- Create timestamped backups before modification
- Format: <file>.modshells-backup-YYYYMMDD-HHMMSS
- Uses Ada.Calendar for timestamp generation

Shell-specific sourcing syntax (Get_Sourcing_Block):
- POSIX shells (Bash, Zsh, Ksh, Dash, Oils): for loop with . sourcing
- Fish: for loop with source command
- Nushell: glob-based sourcing with path join
- Tcsh: foreach with source
- Ion: for loop with source
- PowerShell: Get-ChildItem piped to dot-sourcing

Source injection (Modularise_Config):
- Check if already modularized via MODSHELLS_START signature
- Create config directory if needed (Fish, Nushell, etc.)
- Backup existing config file
- Append sourcing block

Main procedure:
- Display detected shells with status
- Call Modularise_All_Shells for all installed shells
- Version bump to v0.1
Examples (examples/):
- core/00-path.sh: PATH modifications for common tools
- core/10-history.sh: History configuration
- core/20-options.sh: Shell options, editor, locale
- tools/git.sh: Git aliases (gs, ga, gc, gp, etc.)
- tools/fzf.sh: Fuzzy finder with fd integration
- tools/starship.sh: Starship prompt init
- misc/aliases.sh: Navigation, ls variants, safety nets
- misc/functions.sh: mkcd, extract, ff, fd, backup
- os/linux.sh: Package manager aliases, systemd
- os/macos.sh: Homebrew, macOS utilities
- ui/colours.sh: Terminal and man page colours
- ui/prompt.sh: Custom prompt with git branch

Tests (tests/):
- smoke_test.sh: Shell-based smoke test verifying:
  - Source files exist
  - Examples structure correct
  - SPDX headers present
  - Binary runs and creates directories
  - Idempotency works
- test_shell_manager.adb: Ada unit tests for Shell_Manager
- tests.gpr: GPRBuild project for tests

README updates:
- Added Examples section with file descriptions
- Added Testing section with smoke and unit test instructions
@hyperpolymath hyperpolymath merged commit e43ecbc into main Dec 27, 2025
8 of 9 checks passed
@hyperpolymath hyperpolymath deleted the claude/update-readme-content-DNJab branch December 27, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants