removed windows and linux split subdir
This commit is contained in:
parent
83dda10fa8
commit
065b982734
280 changed files with 9053 additions and 426 deletions
41
.antidote/functions/__antidote_parse_bundles
Normal file
41
.antidote/functions/__antidote_parse_bundles
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/zsh
|
||||
|
||||
### Parse antidote's bundle DSL.
|
||||
#function __antidote_parse_bundles {
|
||||
emulate -L zsh; setopt local_options $_adote_funcopts
|
||||
$__adote_awkcmd '
|
||||
BEGIN { RS="[\r\n]" }
|
||||
|
||||
# skip comments and empty lines
|
||||
/^ *$/ || /^ *#/ {next}
|
||||
|
||||
# strip trailing comments
|
||||
{ sub(/[ \t]#.*$/,"",$0) }
|
||||
|
||||
# escape leading $ variables
|
||||
{ sub(/^\$/,"\\$",$0) }
|
||||
|
||||
# handle extension functionality (eg :use ohmyzsh)
|
||||
$1~/^:/ {
|
||||
sub(/^:/,"",$1)
|
||||
printf "antidote-script-" $1
|
||||
for (i=2; i<=NF; i++) {
|
||||
printf " %s",$i
|
||||
}
|
||||
printf "\n"
|
||||
next
|
||||
}
|
||||
|
||||
# move flags to front and call antidote-script
|
||||
{
|
||||
sub(/ #.*$/,"",$0)
|
||||
printf "antidote-script"
|
||||
for (i=2; i<=NF; i++) {
|
||||
sub(/^/,"--",$i)
|
||||
sub(/:/," ",$i)
|
||||
printf " %s",$i
|
||||
}
|
||||
printf " %s\n",$1
|
||||
}
|
||||
' "$@"
|
||||
#}
|
||||
Loading…
Add table
Add a link
Reference in a new issue