laktak / tome

🔁 Script playbooks for frequent commands in any terminal application
MIT License
46 stars 0 forks source link

Adding placeholders for command templates #1

Open CaptainQuirk opened 1 week ago

CaptainQuirk commented 1 week ago

Hi !

I just discovered your project and it looks really great.

What do you think about adding support for variables ?

Example :

convert {in} {out}

Pressing enter on this line in a playbook would prompt (in vim ? in tmux ?) for both in and out variable values before executing them.

Filling the variable values could even be facilitated by the use of extracto !

What do you think ?

CaptainQuirk commented 1 week ago

I had missed the comment about shell variables, but I think that handling variables via shell functions and shell variables will rapidly clutter playbook files

laktak commented 1 week ago

I usually define my variables in the playbook. Without them I would only have "half" of my commands.

Some basic support for variables would be nice though in case the language does not easily support them. I'll think about it.

laktak commented 6 days ago

Please take a look at the variable support. You should be able to keep your variable definitions out of your playbooks if you wish.

Undefined variables will open in a scratchbook where you can define them, but will not be saved.

CaptainQuirk commented 5 days ago

I'll have a look ! Thanks !