def choose_last_used() -> None: click.echo('Please choose one of the following .comeback recipes:') last_used, last_used_str = list_last_used() click.echo(last_used_str) index = int(input("> ")) path = last_used[index - 1]['path'] load_config(path) config.add_comeback_path(path)
def create_comeback_file_here() -> pathlib.Path: verbose_echo('Creating a blank .comeback configuration file.') path = paths.CURRENT_DIR / '.comeback' if path.exists(): verbose_echo('.comeback file already exists here. Will only touch it.') path.touch() config.add_comeback_path(path) return path
def choose_last_used() -> None: click.echo('Please choose one of the following .comeback recipes:') last_used, last_used_str = list_last_used() click.echo(last_used_str) index = int(input('> ')) # pragma: no cover path = last_used[index - 1]['path'] # pragma: no cover recipe.load(path) # pragma: no cover config.add_comeback_path(path) # pragma: no cover
def get_config_path() -> pathlib.Path: cwd_path = paths.CURRENT_DIR / '.comeback' if cwd_path.exists(): config.add_comeback_path(cwd_path) return cwd_path last_comeback_used = config.get_last_comeback() verbose_echo('No .comeback file found in the current directory, ' + f'starting last session found ({last_comeback_used})') return last_comeback_used