Skip to content

Commit b102463

Browse files
committed
sort cdsub
1 parent a8f10c2 commit b102463

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cdhist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ function cdsub {
263263
[ "$1" ] && gr=$($awk 'BEGIN{OFS=".*";for(i=1;i<ARGC;i++) $i=ARGV[i];print}' "$@")
264264
printf "%s" " Searching directories..." >&2
265265
cdselect "$CDNBDIRS" "$(find -L "$orig" -xdev -mindepth 1 -maxdepth $depth '(' -name '.?*' -prune -o -name '__pycache__' -prune ')' -o -type d -print |\
266-
grep -- "$gr" 2>/dev/null;tput cub 25 >&2;tput el >&2)"
266+
sort -u |grep -- "$gr" 2>/dev/null;tput cub 25 >&2;tput el >&2)"
267267
}
268268

269269
# use locate to get directories

0 commit comments

Comments
 (0)