You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by charudatta10 January 16, 2025
A terminal user interface to select task similar to one implemented in just using just --choose command. I had implemented ad-hoc solution as follow:
@taskdefdefault(c):
# Run `invoke --list` to get a list of tasksresult=subprocess.run(['invoke', '--list'], capture_output=True, text=True)
tasks_output=result.stdout# Parse the tasks from the outputtasks= []
forlineintasks_output.split('\n'):
ifline.strip() andnotline.strip().startswith('Available tasks'):
task_name=line.strip().split(' ')[0]
tasks.append(task_name)
# Display tasks to the userprint("Choose a task:")
fori, task_nameinenumerate(tasks, 1):
print(f"{i}: {task_name}")
# User selects a taskchoice=int(input("Enter the number of your choice: "))
task_name=tasks[choice-1]
c.run(f"invoke {task_name}")
looking for native solution
The text was updated successfully, but these errors were encountered:
Discussed in #1018
Originally posted by charudatta10 January 16, 2025
A terminal user interface to select task similar to one implemented in just using just --choose command. I had implemented ad-hoc solution as follow:
looking for native solution
The text was updated successfully, but these errors were encountered: