Skip to content

Commit

Permalink
properly resolve awk script path
Browse files Browse the repository at this point in the history
  • Loading branch information
Morantron committed Apr 30, 2017
1 parent cefe4e6 commit b58b8a0
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions tmux-printer
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
#!/usr/bin/env bash

# TODO proper regexp with capturing group
#PATTERN_FORMAT="#\[\([^]]*\)\]"
PATTERN_FORMAT="#\[\([^]]*\)\]"

# TODO use tput
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

if [[ $1 == '--debug' ]]; then
echo "$*" | awk -f ./tmux-printer.awk
echo "$*" | awk -f $CURRENT_DIR/tmux-printer.awk
else
eval "echo -e $(echo "$*" | awk -f ./tmux-printer.awk)"
eval "echo -e $(echo "$*" | awk -f $CURRENT_DIR/tmux-printer.awk)"
fi

0 comments on commit b58b8a0

Please sign in to comment.