Skip to content

Commit

Permalink
Merge pull request #121 from tmack0/fix_rm_group
Browse files Browse the repository at this point in the history
Removes context file if current context group is removed
  • Loading branch information
nosarthur authored Jan 10, 2021
2 parents eb406b6 + 1e910d0 commit d349135
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions gita/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,11 @@ def f_group(args: argparse.Namespace):
del groups[gname]
utils.write_to_groups_file(groups, 'w')
elif cmd == 'rm':
ctx = utils.get_context()
for name in args.to_ungroup:
del groups[name]
if ctx and str(ctx.stem) == name:
ctx.unlink()
utils.write_to_groups_file(groups, 'w')
elif cmd == 'add':
gname = args.gname
Expand Down

0 comments on commit d349135

Please sign in to comment.