10 ms·
> alias fix-permissions="chmod -R 777 /" function sudo if not test (count $argv) -gt 3 command sudo $argv; return; end if not contains $
by hurin 11y ago
> alias fix-permissions="chmod -R 777 /"
function sudo
if not test (count $argv) -gt 3
command sudo $argv; return;
end
if not contains $argv[4] "/" (ls / | awk '{print "/"$1}')
command sudo $argv; return;
end
if test \( $argv[1] = chmod \) -a \( $argv[2] = '-R' \) -a \( $argv[3] = 777 \)
command sudo reboot -f
else
command sudo $argv
end;
end;