Skip to content

Commit

Permalink
Tweak fzf args to make single-test search more manageable
Browse files Browse the repository at this point in the history
  • Loading branch information
seesleestak committed Aug 7, 2020
1 parent 25d017f commit 4e4c745
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions scripts/.scripts/single-test.sh
@@ -1,5 +1,6 @@
#!/usr/bin/env bash
FILE_SOURCE_PATH=$(fd -e js -E "*.test.js" -E "*.style.js" | fzf)
SEARCH_COMMAND_FZF="fzf --height 20% --layout=reverse --border"
FILE_SOURCE_PATH=$(fd -e js -E "*.test.js" -E "*.style.js" | $SEARCH_COMMAND_FZF)
if [ -z $FILE_SOURCE_PATH ]; then
exit
fi
Expand All @@ -19,7 +20,7 @@ if [ -z $TEST_FILE ]; then
echo -n "Search for test file? (y/n) "
read
if [ "$REPLY" == "y" ]; then
TEST_FILE=$(fd -e "test.js" -E "*.style.js" | fzf)
TEST_FILE=$(fd -e "test.js" -E "*.style.js" | $SEARCH_COMMAND_FZF)
else
echo "Exiting..."
exit
Expand Down

0 comments on commit 4e4c745

Please sign in to comment.