Skip to content

Commit

Permalink
Fixing AWK regexp for Mac
Browse files Browse the repository at this point in the history
  • Loading branch information
jtyr committed Nov 24, 2017
1 parent cf62b70 commit 26e11fc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sources/prompt_forwarding/local
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function gbt__local_rcfile() {

echo "export GBT__CONF='$GBT__CONF'" > $GBT__CONF
cat $GBT__PROFILE >> $GBT__CONF
echo "$(alias | awk '/gbt_/ {sub(/^(alias |)(gbt___|)/, "", $0); print "alias "$0}')" >> $GBT__CONF
echo "$(alias | awk '/gbt_/ {sub(/^(alias )?(gbt___)?/, "", $0); print "alias "$0}')" >> $GBT__CONF
echo "export GBT__STATUS='$(source $GBT__THEME; GBT_SHELL='bash' GBT_CARS='Status, Custom1' gbt 1)'" >> $GBT__CONF
echo -n "PS1='" >> $GBT__CONF
(source $GBT__THEME; gbt | awk '{gsub(/\\\$/, "$"); printf "%s", $0}') >> $GBT__CONF
Expand Down Expand Up @@ -132,7 +132,7 @@ function gbt_vagrant() {
export GBT__CONF=\"/tmp/.gbt.$RANDOM\" &&
echo \"export GBT__CONF='\$GBT__CONF'\" > \$GBT__CONF &&
echo \"$(base64 $GBT__PROFILE | tr -d '\r\n')\" | base64 -d >> \$GBT__CONF &&
echo \"$(alias | awk '/gbt_/ {sub(/^(alias |)(gbt___|)/, "", $0); print "alias "$0}')\" >> \$GBT__CONF &&
echo \"$(alias | awk '/gbt_/ {sub(/^(alias )?(gbt___)?/, "", $0); print "alias "$0}')\" >> \$GBT__CONF &&
echo \"export GBT__STATUS='$(source $GBT__THEME; GBT_SHELL='bash' GBT_CARS='Status, Custom1' gbt 1)'\" >> \$GBT__CONF &&
echo \"PS1='$(source $GBT__THEME; gbt)'\" >> \$GBT__CONF &&
bash --rcfile \$GBT__CONF;
Expand Down

0 comments on commit 26e11fc

Please sign in to comment.