[Lunar-commits] CVS: theedge/sbin lsh,1.2,1.3

Auke Kok sofar at lunar-linux.org
Sun Oct 31 14:32:00 UTC 2004


Update of /var/cvs/lunar/theedge/sbin
In directory espresso.foo-projects.org:/tmp/cvs-serv31299/sbin

Modified Files:
	lsh 
Log Message:
Allow lsh to be passed lunar functions or whichever command as a parameter, which will then be evaluated within the lsh environment. Example: `lsh list_expired_modules`


Index: lsh
===================================================================
RCS file: /var/cvs/lunar/theedge/sbin/lsh,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- lsh	27 Apr 2003 17:24:56 -0000	1.2
+++ lsh	31 Oct 2004 14:31:58 -0000	1.3
@@ -8,11 +8,12 @@
 
 set_priority
 
-message "\n    ${PROBLEM_COLOR}Warning:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
-        "lsh is potential hazardous to your system.${DEFAULT_COLOR}\n"
-
-export PS1="\[\033[0;31m\][lunar] \u@\h \w \\$ \[\033[0m\]"
-
-
-bash --rcfile /etc/lunar/config
+if (( $# > 0 )) ; then
+  $@
+else
+  export PS1="\[\033[0;31m\][lunar] \u@\h \w \\$ \[\033[0m\]"
+  message "\n    ${PROBLEM_COLOR}Warning:${DEFAULT_COLOR}${MESSAGE_COLOR}" \
+          "lsh is potential hazardous to your system.${DEFAULT_COLOR}\n"
+  bash --rcfile /etc/lunar/config
+fi
 



More information about the Lunar-commits mailing list