arcticicestudio / snowsaw

A lightweight, plugin-driven and dynamic dotfiles bootstrapper.
MIT License
98 stars 8 forks source link

The way to go: Allow complex shell commands in the `shell` task #100

Open xulongwu4 opened 2 years ago

xulongwu4 commented 2 years ago

This PR changes the way in which commands in a shell task are executed. It runs a cmd command in a shell task by invoking $SHELL -c cmd. This is also how shell commands were executed in the python implementation.

Pros of using $SHELL -c cmd to execute a cmd:

  1. cmd can be a complex shell commands with &&, || or pipe. This fixes #98.
  2. Expansion of ~ and environment variables are performed the same way as regular shell commands.
arcticicestudio commented 2 years ago

Hi @xulongwu4 :wave:, thanks for your contribution :+1: I'll test and review the changes within the next week(s).