summaryrefslogtreecommitdiff
path: root/.local/bin/aliasgen
blob: 00fbc68ccc215a686fa10b3fe7d5a5a66d4a00c0 (plain)
1
2
3
4
5
6
7
#!/bin/sh

# Removing unecessary comments and documentation
raw="$(sed 's/^\s*//;s/#.*$//;s/,\s*/,/g;/^$/d' <"$XDG_CONFIG_HOME/aliasrc")"

# #---zsh---# #
echo "$raw" | sed 's/\(.*\),\(.*\)/alias \1="\2"/' >$HOME/.cache/zsh-aliases