oh-my-fish/plugins/ta/cli/ta.cli.clear.fish

21 lines
416 B
Fish
Raw Normal View History

2015-02-22 00:14:45 +08:00
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