]> git.nbdom.net Git - nb.git/commitdiff
etc/profile.d/sys.sh
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 22 Feb 2017 16:39:56 +0000 (16:39 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Wed, 22 Feb 2017 16:39:56 +0000 (16:39 +0000)
etc/profile.d/sys.sh

index 60b93cfd7dbf7bbc5edbab3aa96975f94e385c34..7ff120b92e163b97ed2bbef079dabd5d0f423503 100644 (file)
@@ -7,15 +7,6 @@ sys_is_vm() {
   grep -q ^flags.*\ hypervisor /proc/cpuinfo && echo "This machine is a VM"
 }
 
-sys_watch() {
-  local opt="$@"
-  [ -z "$opt" ] && opt="-d"
-
-  export -f sys_activity
-  watch --no-title $opt sys_activity
-  #watch --no-title $opt bash -c "sys_activity"
-}
-
 sys_logs() {
   true
 }
@@ -68,3 +59,13 @@ sys_activity() {
 export -f sys_activity
 export -f sys_logs
 ) 2> /dev/null | true
+
+sys_watch() {
+  local opt="$@"
+  [ -z "$opt" ] && opt="-d"
+
+  export -f sys_activity
+  watch --no-title $opt sys_activity
+  #watch --no-title $opt bash -c "sys_activity"
+}
+