oh-my-fish/plugins/bak/bak.load
2014-06-11 13:00:50 -03:00

13 lines
250 B
Fish

function __bak_name
# trim / for directories
set arg (echo $argv[1] | sed "s/\///")
echo "$arg.(date +"%Y%m%d_%H%M%S").bak"
end
function __bak
set program $argv[1]
for arg in $argv[2..-1]
eval $program $arg (__bak_name $arg)
end
end