]> git.mdlowis.com Git - projs/tide.git/commitdiff
Fixed issue with unit tests, added a new etabs function to the rc file and tweaked...
authorMichael D. Lowis <mike.lowis@gentex.com>
Tue, 31 Jan 2017 19:41:54 +0000 (14:41 -0500)
committerMichael D. Lowis <mike.lowis@gentex.com>
Tue, 31 Jan 2017 19:41:54 +0000 (14:41 -0500)
edit
editrc
tests/xedit.c

diff --git a/edit b/edit
index 6da509401adf3487a14bef9964c609beaef2572d..b4b53dd7d183cba4939665b21bd22db0af80c131 100755 (executable)
--- a/edit
+++ b/edit
@@ -9,6 +9,11 @@ export PATH="$HOME/.config/edit/tools:$PATH"
 export EDITRCFILE="$HOME/.config/edit/editrc"
 export BASH_ENV="$EDITRCFILE"
 
+# Load the rc file
+if [ -f "$EDITRCFILE" ]; then
+    . "$EDITRCFILE"
+fi
+
 # Now figure out the correct editor to execute
 if [ -z "$DISPLAY" ]; then
     if [ -z "$EDITOR" ]; then
@@ -20,7 +25,6 @@ elif [ 0 -eq $# ]; then
     (nohup xedit > /dev/null 2>&1) &
 else
     for f in "$@"; do
-        [ -f "$EDITRCFILE" ] && . "$EDITRCFILE"
         (nohup xedit "$f" > /dev/null 2>&1) &
     done
 fi
diff --git a/editrc b/editrc
index 6cd3eafd161b821b3d02246ec045de37d0673fb8..a984698a08bcbfd1d2f3a64a3c459d04bdbc73e3 100644 (file)
--- a/editrc
+++ b/editrc
@@ -24,3 +24,6 @@ uc(){ sed -e 's/^\/\///'; }
 bcmt(){ sed -e 's/^/#/'; }
 ucmt(){ sed -e 's/^#//'; }
 
+# Expand tabs to spaces
+etabs(){ sed -e 's/\t/    /g'; }
+
index 51464577ef553a29e5b143f7351d1a5aa42355b1..13d67fff58347671a99c9b7b17fa86e62eca085d 100644 (file)
@@ -23,6 +23,7 @@ void mockexit(int code) {
 /* Helper Functions
  *****************************************************************************/
 void setup_view(enum RegionId id, char* text, int crlf, unsigned cursor) {
+    ShellCmd[0] = "/bin/sh";
     Focused = id;
     view_init(getview(id), NULL);
     getbuf(id)->crlf = crlf;