Skip to content

Commit

Permalink
Update "fuzzy-snippets".
Browse files Browse the repository at this point in the history
  • Loading branch information
damiendart committed Oct 9, 2024
1 parent 8217a1f commit 4d2638e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bin/fuzzy-snippets
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ variable is set to a colon-seperated list of directories containing
files to use as snippets.
Snippets are passed through envsubst to allow for placeholder content.
The following additional environment variables are available:
CURRENT_DATE_TIME, CURRENT_YEAR, GIT_USER_NAME, and GIT_USER_EMAIL.
If the GNU version of getopt is available it will be used to preprocess
command-line arguments, enabling support for grouped short options and
Expand Down Expand Up @@ -191,8 +193,9 @@ set -e
SELECTED_ACTION=$(echo "$FZF_OUTPUT" | head -1)
SELECTED_FILE=$(echo "$FZF_OUTPUT" | tail -1)

# Additional environment variable are listed in the help text.
SNIPPET=$(\
CURRENT_DATE_TIME=$(date +%Y-%m-%d\ %_H:%M) \
CURRENT_DATE_TIME=$(date +%Y-%m-%d\ %0H:%M) \
CURRENT_YEAR=$(date +%Y) \
GIT_USER_NAME=$(git config --global user.name) \
GIT_USER_EMAIL=$(git config --global user.email) \
Expand Down

0 comments on commit 4d2638e

Please sign in to comment.