12 lines
338 B
Bash
12 lines
338 B
Bash
#!/bin/bash
|
|
# Add a content line by decorating the input with triple backticks ```
|
|
PLUGIN_CONTENT+=( hookContentCmd )
|
|
hookContentCmd(){
|
|
[[ -z "$1" ]] && echo "Add a shell command line" && return
|
|
TMP="$1"
|
|
read -e -p "Command line? " CMD
|
|
[[ -z "$CMD" ]] && panic "Not a valid content" && return
|
|
echo "\`\`\`$CMD\`\`\`" >> $TMP
|
|
}
|
|
|