Преглед изворни кода

Merge branch 'master' of gitea:gmj/home.public.dotfiles

George Jones пре 1 година
родитељ
комит
28fce280a2
2 измењених фајлова са 19 додато и 5 уклоњено
  1. 4 5
      .bashrc
  2. 15 0
      rc.local/find-aliases.sh

+ 4 - 5
.bashrc

@@ -107,14 +107,14 @@ source $HOME/lib/bash/bashutils.sh  # error,warning,...
 indirs ()
 # return "true" if there is a directory in the stack that contains "$1"
 (
-    
+
     CONTAINS="${1:-NONE}"
 
     if [ "$CONTAINS" == "NONE" ]; then
         warn "no directory name given for indirs"
         return $FALSE
     fi
-    
+
     for d in `dirs`;
     do
         if [[ "$d" == *"${CONTAINS}"* ]]; then
@@ -129,7 +129,7 @@ indirs ()
 p2 ()
 # pop to (p2) a directory in the directory stack that contains P2THIS
 {
-    
+
     P2THIS="${1:-NONE}"
 
     if [ "$P2THIS" == "NONE" ]; then
@@ -379,8 +379,7 @@ else
     export OPEN='echo OPEN not defined';
 fi
 
-export BROWSER=firefox
-
+export BROWSER=brave
 
 # new file tail file
 function nftf { NF=`nf ${1:-.}`; debug NF $NF;  echo "$NF" | xargs tail -f  ; }

+ 15 - 0
rc.local/find-aliases.sh

@@ -0,0 +1,15 @@
+function lo {
+    # locate org files
+    WHAT=${1:-.org};
+    debug WHAT $WHAT;
+    locate "$WHAT" | grep \.org | grep -v backup
+}
+
+function gorg (
+    # grep or WHAT in org files in the current directolry younger than AGE
+    WHAT=${1:-.org};
+    AGE=${2:-7};
+    debug WHAT $WHAT;
+    debug AGE $AGE;
+    find . -name \*.org -mtime -${AGE} -exec grep -i --color=always -H -e  "${WHAT}" \{\} \;
+)