UI: ENH: Mention destination task NR on move and only use file prefixes#462
Open
inkarkat wants to merge 2 commits intotodotxt:masterfrom
Open
UI: ENH: Mention destination task NR on move and only use file prefixes#462inkarkat wants to merge 2 commits intotodotxt:masterfrom
inkarkat wants to merge 2 commits intotodotxt:masterfrom
Conversation
…on prefix The prefix (i.e. normally "TODO:" already indicates the active todo file; there's no need to repeat its file name. As both source and destination files are relative to $TODO_DIR, printing the entire file path doesn't add relevant information and is just distracting. For consistency, the destination should also be printed by its uppercased prefix only. This would only lead to ambiguities if subdirs below $TODO_DIR with identical files were used, which isn't recommended nor likely.
This avoids the lookup of the resulting task number when applying subsequent actions to the moved task (or when undoing an accidental move). Resolves todotxt#461
There was a problem hiding this comment.
Pull Request Overview
Adds destination task number reporting and short file prefixes to move command output, improving clarity and avoiding later lookups. Updates corresponding tests to reflect the new output format.
- Compute destination line number after move and include it in verbose output
- Replace full filenames with uppercase file prefixes via getPrefix
- Adjust error message and test expectations accordingly
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| todo.sh | Adds dest line number lookup and updates verbose and error messages to use file prefixes |
| tests/t1850-move.sh | Updates expected output messages to match new format including destination task number and prefixes |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This avoids the lookup of the resulting task number when applying subsequent actions to the moved task (or when undoing an accidental move).
Prefixes (i.e. "TODO:") are used to indicate the active todo file; the full file name just clutters the output as both source and destination are in
$TODO_DIR, anyway.Before submitting a pull request, please make sure the following is done:
master.