Skip to content

Commit

Permalink
use a more portable version of mktemp, also there was a bug in the aw…
Browse files Browse the repository at this point in the history
…k command that was preventing L from printing on ubunut
  • Loading branch information
huy committed Mar 3, 2011
1 parent 8e506e7 commit 227ae63
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bashmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ function check_help {
function l {
check_help $1
source $SDIRS

# if color output is not working for you, comment out the line below '\033[1;32m' == "red"
env | sort | awk '(substr($0,0,4)=="DIR_"){split(substr($0,5),parts,"="); printf("\033[1;31m%-20s\033[0m %s\n", parts[1], parts[2]);}'
env | sort | awk '/DIR_.+/{split(substr($0,5),parts,"="); printf("\033[1;31m%-20s\033[0m %s\n", parts[1], parts[2]);}'

# uncomment this line if color output is not working with the line above
# env | grep "^DIR_" | cut -c5- | sort |grep "^.*="
Expand Down Expand Up @@ -133,7 +133,7 @@ function _compzsh {
function _purge_line {
if [ -s "$1" ]; then
# safely create a temp file
t=$(mktemp -t bashmarks) || exit 1
t=$(mktemp -t bashmarks.XXXXXX) || exit 1
trap "rm -f -- '$t'" EXIT

# purge line
Expand Down

0 comments on commit 227ae63

Please sign in to comment.