Skip to content

feat: dynamic argument substitution and placeholders#11

Open
Jintin wants to merge 2 commits into
masterfrom
feature/dynamic-args
Open

feat: dynamic argument substitution and placeholders#11
Jintin wants to merge 2 commits into
masterfrom
feature/dynamic-args

Conversation

@Jintin
Copy link
Copy Markdown
Owner

@Jintin Jintin commented Apr 25, 2026

This PR adds support for dynamic arguments in aliases without breaking the existing storage format.

Features

  • Append: If no placeholders are used, arguments are appended to the end of the command.
  • Global Fill (?): The ? placeholder is replaced by all provided arguments.
  • Positional Fill (?1, ?2...): Placeholders like ?1 and ?2 are replaced by the corresponding positional arguments.

Improvements

  • No changes to the ~/.aliasme/cmd format; existing aliases continue to work perfectly.
  • Proper handling of arguments with spaces using eval and $*/$@.
  • Updated help menu with documentation for the new features.
  • Comprehensive new test suite in test/aliastest.sh.

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.

1 participant