add useful func
authorIan Kelling <ian@iankelling.org>
Fri, 28 Nov 2025 10:07:06 +0000 (05:07 -0500)
committerIan Kelling <ian@iankelling.org>
Fri, 28 Nov 2025 10:07:06 +0000 (05:07 -0500)
brc2

diff --git a/brc2 b/brc2
index 88781140daa8a196c3ec6f9542535651c05565de..55884f57210951b8147b47bb0215d370250be719 100644 (file)
--- a/brc2
+++ b/brc2
@@ -4941,6 +4941,8 @@ psq-exdoc () {
   psql dl <<<"\i $file" | /a/c/psq-ex | pee cat  "sponge -a $file"
 }
 
+
+
 export BASEFILE_DIR=/a/bin/fai-basefiles
 
 #export ANDROID_HOME=/a/opt/android-home
@@ -4974,6 +4976,58 @@ letter-hac-fsf() {
 END {print  words, page}' ISAL.txt | sort -n
 }
 
+## view 100 dirs at a time with i2x
+#
+# Usage: i2x100 [-i INITIAL_DIR_NUM] [DIRS]
+#
+# Without DIRS, defaults to *.
+i2x100() {
+  local -i i=0 batch=100;
+  local -a ds
+  if [[ $1 == -i ]]; then
+    i="$2"
+    shift 2
+    fi
+
+  if (( $# )); then
+    ds=( "$@" )
+    else
+  ds=(*);
+  fi
+  echo max ${#ds[@]}
+  export I2X_SORT_ORDER=path I2X_DISABLE_XINPUT2=1
+  for (( ; i<${#ds[@]}; i+=batch)); do
+    e i=$i
+     m i2x ${ds[@]:$i:$batch};
+  done; };
+
+
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+########################## ####################################################
+########################## ##########################
+
+
+
+
+
+
 
 # things to remember:
 # ALT-C - cd into the selected directory