]> gitweb.fluxo.info Git - keyringer.git/commitdiff
Run shell by default (#34)
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 10 Dec 2013 19:36:04 +0000 (17:36 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 10 Dec 2013 19:36:04 +0000 (17:36 -0200)
keyringer
lib/keyringer/actions/shell

index 33d19ff7627e89ea88fffbba0312bbf481aff8ab..9c45d97ab5bb6218cd4f46a877d6955c77f8ecd1 100755 (executable)
--- a/keyringer
+++ b/keyringer
@@ -162,12 +162,14 @@ source "$LIB" || exit 1
 # Setup main configuration and load preferences
 keyringer_config_load
 
-if [ -z "$ACTION" ]; then
+# Dispatch
+if [ -z "$KEYRING" ]; then
   keyringer_usage
   exit 1
-fi
-
-if [ "$ACTION" == "init" ]; then
+elif [ -z "$ACTION" ]; then
+  # Run shell if no action were given
+  keyringer $KEYRING shell
+elif [ "$ACTION" == "init" ]; then
   keyringer_init $*
 elif keyringer_has_action "$ACTION"; then
   keyringer_dispatch $*
index 955dfe8ec5c06ec11886c3b55727adc5e53c3889..ab170b12299bf9e43861c4a9ab3627b87fca0bbf 100755 (executable)
@@ -10,6 +10,9 @@ source "$LIB" || exit 1
 # Basic parameters
 SHELLPATH="/"
 
+# Show usage
+keyringer_usage $KEYRING
+
 # While a "quit" command isn't entered, read STDIN
 while read -rep "keyringer:/${KEYRING}${SHELLPATH}> " STDIN; do
   if [ "$STDIN" == "quit" ] || [ "$STDIN" == "exit" ] || [ "$STDIN" == "bye" ]; then