oh-my-fish/plugins/ta/cli/ta.cli.clear.fish
Jorge Bucaran c6bc4fdcd8 ta-to-done 📒
2015-03-18 08:18:46 +09:00

21 lines
416 B
Fish

function ta.cli.clear
set -l bright_color (set_color FF1493)
set -l normal_color (set_color normal)
set -l question "[$bright_color"Y"$normal_color/n]"
if not test -e $__ta_file_data
echo "Nothing to clear."
return $__ta_error_no_tasks
end
echo -n "Delete all data? $question: "
head -n 1 | read answer
switch $answer
case Y yes
rm $__ta_file_data
echo "Done"
end
end