# HG changeset patch # User Steve Fink # Date 1678816752 25200 # Tue Mar 14 10:59:12 2023 -0700 # Node ID a09438fafbde8d84a4ccfa4d6269b8f931ee8dd8 # Parent a156c4ebdeaa63e3f1a904f818744a013b6d4c25 [artifetch] Better handle Ctrl-C during fuzzy selection diff --git a/bin/artifetch b/bin/artifetch --- a/bin/artifetch +++ b/bin/artifetch @@ -1237,6 +1237,9 @@ if not self.single: cmd_args += " --multi --bind=ctrl-a:select-all" choices = fzf.prompt(options, cmd_args) + if not choices: + print("Nothing selected. fzf may have been cancelled. Stopping.", file=sys.stderr) + sys.exit(1) indexes = [int(c[0 : c.index(" ")]) - 1 for c in choices] self.cache.value(cache_path, indexes)