mirror of
https://github.com/oh-my-fish/oh-my-fish
synced 2024-11-09 13:10:40 +00:00
21 lines
416 B
Fish
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
|