Skip to content

A utility to manage aliases across shells. 跨shell的命令别名管理工具。

Notifications You must be signed in to change notification settings

nomyfan/alias-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

alias-rs

A utility to manage aliases across shells.

Installation

cargo install --git https://github.com/nomyfan/alias-rs

Usage

PowerShell

Add this into your $PROFILE.

Invoke-Expression (&als init powershell | Out-String)

zsh

Add this into your .zshrc.

eval "$(als init zsh)"

bash

Add this into your .bashrc.

eval "$(als init bash)"

fish

Add this into your config.fish.

als init fish | source

Alias config

Put a config file in ~/.config/alias.toml.

Format

All aliases are defined in the aliases table, with alias name as key.

Example

[aliases]
# pnpm
p = "pnpm"
pi = "pnpm install"
pa = "pnpm add"
pb = "pnpm build"
# nvim
vim = "nvim"

[aliases.cls]
zsh = "clear"

[aliases.opengh]
zsh = "node $HOME/.ss/JavaScript/opengh.mjs"
powershell = "node (Join-Path $HOME -ChildPath .ss -AdditionalChildPath JavaScript,opengh.mjs)"

[aliases.rmrf]
zsh = "rm -rf"
powershell = "Remove-Item -Recurse -Force"

About

A utility to manage aliases across shells. 跨shell的命令别名管理工具。

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages