]> gitweb.fluxo.info Git - metadot.git/commitdiff
List option
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 17 Sep 2015 17:14:43 +0000 (14:14 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 17 Sep 2015 17:14:43 +0000 (14:14 -0300)
metadot

diff --git a/metadot b/metadot
index 5a8f8b48cb327006cfc6f9b0d1c24eca25caddb6..027515beba6c23eaacb754d446e81deb8175a2b1 100755 (executable)
--- a/metadot
+++ b/metadot
@@ -174,4 +174,11 @@ elif [ "$OPT" == "load" ]; then
     metadot_load $module
   done
   echo "Backups saved at $BACKUPS."
+elif [ "$OPT" == "list" ]; then
+  # Complete, slow version
+  #find $HOME -lname '*.dotfiles*' -exec ls -la {} | \
+  #grep .dotfiles/modules | sed -e 's|.*.dotfiles/||g' | cut -d '/' -f 2 | sort | uniq
+
+  # Simpler version
+  ls -ag $HOME/ | grep .dotfiles/modules | sed -e 's|.*.dotfiles/||g' | cut -d '/' -f 2 | sort | uniq
 fi