From: Silvio Rhatto Date: Thu, 17 Sep 2015 17:14:43 +0000 (-0300) Subject: List option X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=6f4ef50d2c7e73d6df5b9f426abaf26521e548e5;p=metadot.git List option --- diff --git a/metadot b/metadot index 5a8f8b4..027515b 100755 --- 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