Kaynağa Gözat

add function to quickly rm git .orig files

Andrew Swistak 10 yıl önce
ebeveyn
işleme
e463fde9f0
2 değiştirilmiş dosya ile 16 ekleme ve 0 silme
  1. 8 0
      bashrc
  2. 8 0
      zshrc

+ 8 - 0
bashrc

@@ -79,6 +79,14 @@ dot_sync() {
   git ch $current_branch
 }
 
+rmorig() {
+  if [ "$1" = "-f" ]; then
+    find . -name "*.orig" -print -delete
+  else
+    find . -name "*.orig" -print
+  fi
+}
+
 export PAGER=less
 export DOTFILES=$HOME/Documents/dotfiles
 export PATH=$DOTFILES/bin:$PATH

+ 8 - 0
zshrc

@@ -42,6 +42,14 @@ dot_sync() {
   git ch $current_branch
 }
 
+rmorig() {
+  if [ "$1" = "-f" ]; then
+    find . -name "*.orig" -print -delete
+  else
+    find . -name "*.orig" -print
+  fi
+}
+
 # Set Home, End, Del, PgUp, PgDown keys to actually do something.
 bindkey '^[OH' beginning-of-line
 bindkey '^[OF' end-of-line