Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions compose_search
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/usr/bin/bash

if [ "$1" = "-h" ];then
echo lets you search through all your compose sequences for a match
echo USAGE: compose_search sequence/symbol
elif command -v rg >/dev/null 2>&1 ; then
rg -i "$1" /home/nitsi/documents/xcompose/*
found=$(rg -i "$1" /home/nitsi/documents/xcompose/*)
else
grep -inT "$1" /home/nitsi/documents/xcompose/*
found=$(grep -inT "$1" /home/nitsi/documents/xcompose/*)
fi

if [ -z "$found" ]; then
echo "no matches found"
fi