From: Michael D. Lowis Date: Thu, 20 Jul 2017 01:31:02 +0000 (-0400) Subject: Added tcmd bash script to setup tide command environment for running bash X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=bdd193a452e2d3f28e00961bf07bfb69c2b6e09a;p=projs%2Ftide.git Added tcmd bash script to setup tide command environment for running bash --- diff --git a/tcmd b/tcmd new file mode 100755 index 0000000..38af1c9 --- /dev/null +++ b/tcmd @@ -0,0 +1,26 @@ +#!/bin/bash + +# setup editor env +export PS1=":; " +export PATH="$HOME/.config/tide/tools:$PATH" +export EDITRCFILE="$HOME/.config/edit/editrc" +export BASH_ENV="$EDITRCFILE" + +function cd(){ + command cd "$@" && echo -en "\033P$PWD\0" +} +export -f cd + +edit(){ + [[ -f "$EDITRCFILE" ]] && . "$EDITRCFILE" + + # Now figure out the correct editor to execute + if [[ -z "$DISPLAY" ]]; then + "$EDITOR" "$@" + else + bkg tide "$@" + fi +} +export -f edit + +exec tide --