summaryrefslogtreecommitdiff
path: root/.local/bin/aliasgen
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2024-07-15 13:05:15 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2024-07-15 13:05:15 -0400
commit8ca0926edde27de7f31e31c9038721b55cf67d05 (patch)
tree3650d2280279043ab4337210afeb91853f659fcc /.local/bin/aliasgen
parente45405aabb815d85f32d61b1d98f233ccf89e4b4 (diff)
Sixel fastfetch & better git root alias
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"