Releases: PCOffline/alias-helper
v0.2.1
Full Changelog: v0.2.0...v0.2.1
Features
- Add log infrastructure, debug logs and error handling
- Better filtering of invalid aliases
- Identify and remove circular aliases
Bug-Fixes
- Handle empty inputs
- Fix behaviour for single-word aliases
Infrastructure
- Add more unit tests
- Add template for GitHub issues
- Split logic to modules and clean up API exposes
- Add license
v0.2.0
Features
Support Recursive Aliases
Expands all aliases to find the matching alias even if the best-fitting alias uses a different alias in its definition.
For example:
alias gb='git branch'
alias gba='gb --all'In v0.1.0, inputting git branch --all would result in gb='git branch'. Starting from v0.2.0, the program can detect that gb is an alias and "expand" it to become git branch, resulting in the output being gba='git branch --all'.
Basically, the aliases we input are converted into their full commands:
alias gb='git branch'
alias gba='git branch --all'If you input gb --all, the output would also be gba='git branch --all', since the definition of the gba alias is exactly that, but what's more interesting is if we add another alias: alias g='git' and input the command g branch --all, we would also get gba='git branch --all'. This is because the expansions happens not only for the inputted aliases, but also for the command itself, which becomes git branch --all.
Bug Fixes
- Fixed bug where an alias of a command with no arguments (for example
alias g='git') could never match
Infrastructure
- Refactored the code to parse once, optimising performance and safety
- Exported more functions and structs in the API
- Added more unit tests
v0.1.0
First release!
Current support for alias matching is only for aliases that are a substring of the input command:
alias gb="git branch"
alias gba="git branch --all"
alias gc="git checkout"
git branch # Should suggest 'gb'
git branch --all # Should suggest 'gba'
git checkout dev # should suggest 'gc dev'