diff --git a/.config/fish/config.fish b/.config/fish/config.fish index 77eac20..37d54a8 100755 --- a/.config/fish/config.fish +++ b/.config/fish/config.fish @@ -11,8 +11,8 @@ set -gx FFF_CD_FILE ~/.fff_d set -g fisher_path ~/.config/fish/fisher set fish_function_path $fish_function_path[1] $fisher_path/functions $fish_function_path[2..-1] set fish_complete_path $fish_complete_path[1] $fisher_path/completions $fish_complete_path[2..-1] -for file in $fisher_path/conf.d/*.fish - builtin source $file 2> /dev/null +for i in $fisher_path/conf.d/* + builtin source $i end # PROGRAM SETTINGS # @@ -24,7 +24,6 @@ set -U Z_CMD "j" xrdb ~/.Xresources # MULTIMC INSTANCES # -for i in $D/Games/Minecraft/Game/instances/* - set i (basename $i) +for i in (ls $D/Games/Minecraft/Game/instances) alias $i="minecraft -l $i" end diff --git a/.config/fish/functions/fruitdl.fish b/.config/fish/functions/fruitdl.fish index 06f6e04..a34b4ce 100755 --- a/.config/fish/functions/fruitdl.fish +++ b/.config/fish/functions/fruitdl.fish @@ -1,16 +1,10 @@ -# Defined in /tmp/fish.cOeTFi/fruitdl.fish @ line 2 +# Defined in /tmp/fish.VXbo9N/fruitdl.fish @ line 2 function fruitdl - set emu $argv[2] - cd $D/Games/Emulators/$emu - set file (wget -O- -o /dev/tty github.com/$emu-emu/$emu-$argv[1]/releases/latest| grep -o -m1 $emu-emu/$emu-$argv[1]/releases/download/$argv[1]-[0-9]\*/$emu-linux-[0-9]\*-[0-9a-f]\* | head -1) - - if grep $file emuver - echo "$emu is already updated" - else + cd $D/Games/Emulators/$argv[2] rm -r $argv[1] - fastdl https://www.github.com/$file.7z - 7z x (basename $file).7z - echo $file > emuver - rm (basename $file).7z - end + set file (curl -sL github.com/$argv[2]-emu/$argv[2]-$argv[1]/releases/latest| grep -o -m1 $argv[2]-emu/$argv[2]-$argv[1]/releases/download/$argv[1]-[0-9]\*/$argv[2]-linux-[0-9]\*-[0-9a-f]\*) + dl http://github.com/$file.7z + set file (basename $file) + 7z x $file.7z + rm $file.7z end