Skip to content

Commit fc28bd1

Browse files
committed
Add tools for invalid entries removal and manual editing of global bookkeeping
1 parent b00f630 commit fc28bd1

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
ltcd linguist-language=Shell
2+
cd_utils linguist-language=Shell

cd_utils

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# No args
2+
cdrm ()
3+
{
4+
local -r CDF="$HOME/.cd/stats_glob"
5+
local i
6+
7+
while read i; do
8+
[ -d "$i" ] && [ -x "$i" ] && { echo "$i"; continue; }
9+
echo "Removing \"$i\"" > /dev/stderr
10+
done < $CDF > $CDF.tmp
11+
12+
mv $CDF.tmp $CDF
13+
}
14+
15+
# No args
16+
cdedit ()
17+
{
18+
local -r CDF="$HOME/.cd/stats_glob"
19+
20+
vim $CDF
21+
/bin/rm -f $CDF~
22+
}
23+

0 commit comments

Comments
 (0)