JanDeDobbeleer / aliae

Cross shell and platform alias management
https://aliae.dev
MIT License
73 stars 3 forks source link

feat: path Force #104

Closed kiliantyler closed 2 months ago

kiliantyler commented 2 months ago

Prerequisites

Feature:

Allows paths to Always be exported, even if they exist in the current path

Reasoning:

I use the ZSH plugin manager zinit along with z-a-eval annex, this allows the output of aliae init zsh to be cached during ZSH startup so that it does not need to run every startup.

Issue:

When running zinit recache (from the eval annex) Aliae detects my path as already having the paths I'm trying to export in it, thus not adding them to the cached output. This ends up in a scenario where I need to recache open a new shell which now does not have the paths exported, recache again, and then future shells will have the proper paths set.

Resolution:

A simple always: true flag to the path declaration will force it to print the path export command even if it already exists in the path.

kiliantyler commented 2 months ago

Personal note: Apologies for the PR spam, I do like to tool quite a bit but keep running into "It would be nice if..." issues and would like to open PRs if I think I can fix it 🫣

JanDeDobbeleer commented 2 months ago

@kiliantyler your ideas are good, I'm currently still refactoring the first one and almost done.

One pointer, can you rename this to force rather than always? I feel that's more in line with how other tools work.