mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-08-02 05:30:23 +02:00
Enhancement - Path integration
- Obsoleted util.cpp spit, slurp calls
This commit is contained in:
parent
a8f03679ed
commit
abffaa184b
8 changed files with 19 additions and 110 deletions
|
@ -533,7 +533,7 @@ void editFile (Task& task)
|
|||
|
||||
// Format the contents, T -> text, write to a file.
|
||||
std::string before = formatTask (task);
|
||||
spit (file.str (), before);
|
||||
File::write (file.str (), before);
|
||||
|
||||
// Determine correct editor: .taskrc:editor > $VISUAL > $EDITOR > vi
|
||||
std::string editor = context.config.get ("editor");
|
||||
|
@ -557,7 +557,7 @@ ARE_THESE_REALLY_HARMFUL:
|
|||
|
||||
// Slurp file.
|
||||
std::string after;
|
||||
slurp (file.str (), after, false);
|
||||
File::read (file.str (), after);
|
||||
|
||||
// Update task based on what can be parsed back out of the file, but only
|
||||
// if changes were made.
|
||||
|
@ -584,7 +584,7 @@ ARE_THESE_REALLY_HARMFUL:
|
|||
|
||||
// Preserve the edits.
|
||||
before = after;
|
||||
spit (file.str (), before);
|
||||
File::write (file.str (), before);
|
||||
|
||||
if (confirm ("Task couldn't handle your edits. Would you like to try again?"))
|
||||
goto ARE_THESE_REALLY_HARMFUL;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue