Skip to content

Commit

Permalink
Remove any dependency on $GOPATH
Browse files Browse the repository at this point in the history
Previously, we were running a small q.sh script at
$GOPATH/src/github.com/y0ssar1an/q/q.sh. With Go 1.12, $GOPATH is no longer a
requirement. We can't count on q.sh being at that path. This change just takes
the code that was in q.sh and moves it to the qq() function shown in the
README. Users should update their shell configs.
  • Loading branch information
ryboe authored and Ryan Boehning committed Nov 29, 2018
1 parent 406dac8 commit a777bf1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 22 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,19 @@ tailing `$TMPDIR/q`.
```sh
qq() {
clear
local gpath="${GOPATH:-$HOME/go}"
"${gpath%%:*}/src/github.com/y0ssar1an/q/q.sh" "$@"

logpath="$TMPDIR/q"
if [[ -z "$TMPDIR" ]]; then
logpath="/tmp/q"
fi

if [[ ! -f "$logpath" ]]; then
echo 'Q LOG' > "$logpath"
fi

tail -100f -- "$logpath"
}

rmqq() {
if [[ -f "$TMPDIR/q" ]]; then
rm "$TMPDIR/q"
Expand Down
20 changes: 0 additions & 20 deletions q.sh

This file was deleted.

0 comments on commit a777bf1

Please sign in to comment.