浏览代码

Silence non-existent/empty dir errors in fastfile_{sync,ls}

Sumit Sahrawat 5 年之前
父节点
当前提交
f23e4912cf
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      plugins/fastfile/fastfile.plugin.zsh

+ 2 - 2
plugins/fastfile/fastfile.plugin.zsh

@@ -78,7 +78,7 @@ function fastfile_print() {
 #    (=> fastfle_print) for each shortcut
 #
 function fastfile_ls() {
-    for f in "${fastfile_dir}"/*; do
+    for f in "${fastfile_dir}"/*(NF); do
         file=`basename "$f"` # To enable simpler handeling of spaces in file names
         varkey=`echo "$file" | tr " " "_"`
 
@@ -104,7 +104,7 @@ function fastfile_rm() {
 # Generate the aliases for the shortcuts
 #
 function fastfile_sync() {
-    for f in "${fastfile_dir}"/*(N); do
+    for f in "${fastfile_dir}"/*(NF); do
         file=`basename "$f"` # To enable simpler handeling of spaces in file names
         varkey=`echo "$file" | tr " " "_"`