fix ncd, mvregex should get a total facelift
This commit is contained in:
@@ -109,7 +109,10 @@ if [ "$MODE" = "printf" ]; then
|
|||||||
# remove zeroes from beginning, if matching integers
|
# remove zeroes from beginning, if matching integers
|
||||||
let source_match="10#$source_match" &> /dev/null
|
let source_match="10#$source_match" &> /dev/null
|
||||||
target_replace=$( printf "$TGT" "$source_match" )
|
target_replace=$( printf "$TGT" "$source_match" )
|
||||||
mv -iv -- "$file" "$( echo $file | sed s/"$SRC"/"${target_replace}"/ )"
|
target_file="$( echo $file | sed s/"$SRC"/"${target_replace}"/ )"
|
||||||
|
if [[ ! "$file" = "$target_file" ]]; then
|
||||||
|
mv -iv -- "$file" "$( echo $file | sed s/"$SRC"/"${target_replace}"/ )"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -191,7 +191,7 @@ function ncd() {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
local _current_pwd _iter_d _iter_prev _current_found
|
local _current_pwd _iter_d _iter_prev _current_found
|
||||||
_current_pwd=$( basename $( pwd ) )
|
_current_pwd=$( basename "$( pwd )" )
|
||||||
\cd ..
|
\cd ..
|
||||||
for _iter_d in *; do
|
for _iter_d in *; do
|
||||||
if [ ! -d "$_iter_d" ]; then continue; fi
|
if [ ! -d "$_iter_d" ]; then continue; fi
|
||||||
|
|||||||
Reference in New Issue
Block a user