🦊 Simplify grep string for POSIX compatibility
This commit is contained in:
parent
75395d2bbd
commit
0b255413d0
2 changed files with 2 additions and 1 deletions
2
bemoji
2
bemoji
|
@ -199,7 +199,7 @@ _clipResult() {
|
|||
result=$(gather_emojis | _picker)
|
||||
exit_value="$?"
|
||||
[ "$bm_private_mode" = true ] || add_to_recent "$result"
|
||||
result=$(echo "$result" | grep -oP '^[^\s]+' | tr -d '\n')
|
||||
result=$(echo "$result" | grep -o '^\S\+' | tr -d '\n')
|
||||
|
||||
case "$exit_value" in
|
||||
1)
|
||||
|
|
|
@ -18,6 +18,7 @@ setup() {
|
|||
}
|
||||
|
||||
@test "test can run script" {
|
||||
export BEMOJI_CLIP_CMD="echo clip test only"
|
||||
# closing FD3 manually to prevent hangs, see
|
||||
# https://bats-core.readthedocs.io/en/stable/writing-tests.html#file-descriptor-3-read-this-if-bats-hangs
|
||||
run bemoji 3>&-
|
||||
|
|
Loading…
Reference in a new issue