Browse Source

Fortify bcdiff() against junky file paths

Alois Mahdal 9 years ago
parent
commit
14a2f707f8
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      dotfiles/bash/main.bashrc

+ 2
- 2
dotfiles/bash/main.bashrc View File

42
 vims() {
42
 vims() {
43
     # 2015-07-10 06:10:48.603953758 +0200 ~/TODO.todo
43
     # 2015-07-10 06:10:48.603953758 +0200 ~/TODO.todo
44
     local swap="$HOME/.local/share/vim/swap"
44
     local swap="$HOME/.local/share/vim/swap"
45
-    find "$swap" -type f \
46
-      | xargs -r stat -c "%y %n" \
45
+    find "$swap" -type f -print0 \
46
+      | xargs -0 -r stat -c "%y %n" \
47
       | sed "
47
       | sed "
48
             s| $swap/| |
48
             s| $swap/| |
49
             s|%|/|g
49
             s|%|/|g