]> gitweb.fluxo.info Git - scripts.git/commitdiff
Status: replace /mnt/crypt/home/USER with shorthand
authorSilvio Rhatto <rhatto@riseup.net>
Mon, 2 Oct 2017 13:51:44 +0000 (10:51 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Mon, 2 Oct 2017 13:51:44 +0000 (10:51 -0300)
status

diff --git a/status b/status
index e042968efc63efe5867b2236e08e6d9ad591a76e..9f364f3919cf2f6c204976ea6cc284272feba1d1 100755 (executable)
--- a/status
+++ b/status
@@ -76,9 +76,14 @@ function status_run {
     fi
 
     # Update your mrconfig and check all registered repositories
-    # Pipe through cat so we don't have to deal with mr's dynamic output weirdness
     if which mr &> /dev/null; then
-      mrconfig-updater && mr -m status | cat
+      # Pipe through cat so we don't have to deal with mr's dynamic output weirdness
+      #mrconfig-updater && mr -m status | cat
+
+      # Replace eventual "/mnt/crypt/home/$USER" with "~/" from output
+      # Piping through sed also handles mr's dynamic output weirdness
+      #mrconfig-updater && mr -m status | sed -e 's|/mnt/crypt/home/[a-Z]*/|~/|'
+      mrconfig-updater && mr -m status | sed -e "s|/mnt/crypt/home/$USER/|~/|"
     fi
 
     # Check your TODO lists