summaryrefslogtreecommitdiff
path: root/.local/bin/aliasgen
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-07-15 13:29:23 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-07-15 13:29:23 -0400
commit34ce9cf8940ef1ac6cc6e473fede34d332bb6e9a (patch)
treec9332fe647fe9f7d134938fd5cc90f2023dc4b51 /.local/bin/aliasgen
parent114d8f292d177b71ea08c55b70d7856e1bc50baa (diff)
parentac65296872c4a30d9ea6046c5af83eb5b373a2fc (diff)
Merge branch 'master' of github.com:ChausseBenjamin/dotfiles
Diffstat (limited to '.local/bin/aliasgen')
-rwxr-xr-x.local/bin/aliasgen4
1 files changed, 2 insertions, 2 deletions
diff --git a/.local/bin/aliasgen b/.local/bin/aliasgen
index 00fbc68..8f976d0 100755
--- a/.local/bin/aliasgen
+++ b/.local/bin/aliasgen
@@ -1,7 +1,7 @@
#!/bin/sh
# Removing unecessary comments and documentation
-raw="$(sed 's/^\s*//;s/#.*$//;s/,\s*/,/g;/^$/d' <"$XDG_CONFIG_HOME/aliasrc")"
+raw="$(sed 's/^\s*//;s/#.*$//;s/,\s*/,/g;/^$/d' <"${XDG_CONFIG_HOME:-$HOME/.config}/aliasrc")"
# #---zsh---# #
-echo "$raw" | sed 's/\(.*\),\(.*\)/alias \1="\2"/' >$HOME/.cache/zsh-aliases
+echo "$raw" | sed 's/\(.*\),\(.*\)/\1(){\2 $@}/' >"${XDG_CACHE_HOME:-$HOME/.cache}/zsh-aliases"