aliasgen (382B) - raw


      1 #!/bin/sh
      2 
      3 # Removing unecessary comments and documentation
      4 raw=$(cat $HOME/.config/aliasrc | tail -n +17 "$HOME/.config/aliasrc" | sed "s/^|\s*//g;
      5 		s/\(.*\)|\(.*\)|\(.*\)|/\1|\2|\3/g;
      6 		s/\s*$//g;
      7 		/^$/d")
      8 
      9 # #---zsh---# #
     10 echo "$raw" | sed "s/^/alias\ /;
     11                 s/\s*|\s*/=\"/;
     12                 s/^.*-*+-*=\"$//;
     13                 s/\s*|$/\"/" > $HOME/.cache/zsh-aliases