Skip to content

Analyze remaining shell functions for potential migration to devforge #36

@rios0rios0

Description

@rios0rios0

Context

During the shell-to-devforge migration (dotfiles PR #75), several shell functions were successfully ported:

  • git-sync-reposdev repo sync
  • dip / dresetdev docker ips / dev docker reset
  • _vm_use_go / _vm_use_node / _vm_use_pythondev project use

However, two groups of functions were left behind. This issue tracks analyzing whether and how they could be migrated.

Keep in Shell (cannot migrate today)

These were skipped because they mutate the parent shell environment (env vars, cd) or are trivial one-liners. The core blocker is that a subprocess cannot export variables or change the working directory of the parent shell — but the same eval "$(dev ...)" pattern used for dev project use could potentially be applied here.

Function What it does Blocker
aws-prof() Sets AWS_PROFILE env var Subprocess can't export to parent shell
azm-subs() Wraps az account set --subscription Trivial one-liner
reload-credentials() / _op_load_references() Loads secrets from 1Password into env vars Subprocess can't export to parent shell
Kubernetes kubeconfig merging Auto-detects and sets KUBECONFIG from ~/.kube/config-files/ Subprocess can't export to parent shell
pyenv() wrapper / _vm_cleanup_pyenv_locks() Handles noclobber and stale lock file issues Shell-level workaround for pyenv bugs
ls/ll/la/lt/t eza aliases Modern file listing with eza Personal shell preferences

Questions to investigate

  • Could aws-prof, reload-credentials, and kubeconfig merging use the eval pattern (print export statements to stdout)?
  • Is there value in centralizing 1Password credential loading into devforge, or does it belong in dotfiles?
  • Should the pyenv workarounds be upstreamed to pyenv itself rather than maintained in either devforge or dotfiles?
  • Are eza aliases worth managing in a CLI tool, or are they purely shell configuration?

Out of Scope (not development-related)

These are utility functions unrelated to software development workflows. They likely don't belong in devforge but are listed here for completeness.

Function What it does
clear-h() Clears shell history files
clear-logs() Clears system log files older than 5 days
pdf-join() Joins two PDFs with pdftk
pdf-to-jpg() Converts PDF to JPG with ImageMagick
jpg-to-pdf() Converts JPGs to PDF with ImageMagick
video-to-mp4() Converts video to MP4 with ffmpeg

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions