[[Snippets]] Description = "mkpy: Edit Python scratch file" Output = "" Tag = ["python", "scratch"] command = "FILE=\"$(date +%s%N)_$RANDOM.py\"\nprintf '#!/bin/env python\\n\\n' > \"$FILE\"\nchmod +x \"$FILE\"\nhx \"$FILE\"" [[Snippets]] Description = "mktemppy: Edit TEMP Python scratch file" Output = "" Tag = ["python", "scratch"] command = "TEMP=$(mktemp)\nmv \"$TEMP\" \"$TEMP.py\"\nprintf '#!/bin/env python\\n\\n' > \"$TEMP.py\"\nchmod +x \"$TEMP.py\"\nhx \"$TEMP.py\"" [[Snippets]] Description = "clearpy: Clear Python scratch files." Output = "" Tag = ["python", "scratch"] command = "rm -f /tmp/tmp.*.py" [[Snippets]] Description = "Rename" Output = "" Tag = [] command = "mv \"${$(realpath )%%$(basename )}\""