shithub: x

Download patch

ref: 3ac6e2fd1eebb648b80ee77723815d88d84476da
parent: 147c0127fb766de457fe12d0b66f23cd17c028cc
author: kvik <[email protected]>
date: Mon Sep 2 05:42:09 EDT 2019

x/path: have -l output something even if passed a non-path

this helps reduce the  rc: null list in concatenation  errors

--- a/path
+++ b/path
@@ -14,7 +14,7 @@
 	case -r
 		echo $wd | sed 's,(/[^/]+/[^/]+).*,\1,'
 	case -l
-		echo $wd | awk -F/ '{print $3}'
+		echo $wd | awk -F/ '{if($3) print $3; else print $0}'
 	}
 	shift
 }