Skip to content

Commit d347d2e

Browse files
committed
Changes
1 parent dde285a commit d347d2e

File tree

2 files changed

+4
-27
lines changed

2 files changed

+4
-27
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
EasyKey.git/.ezk-git-loca-conf

EasyKey.git/ezk-git-loca.sh

Lines changed: 3 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ initConfig () {
3333
continue
3434
fi
3535
if [ -n "$configline" ]; then
36-
eval "${configsectioname[i]}='$configline'"
36+
eval "${configsectioname}+=('$configline')"
3737
fi
3838
((i++))
3939
done <<< "$(echo -e "$configlines")"
@@ -44,28 +44,7 @@ initConfig
4444
clear
4545
thekeys=($(echo {a..p}) $(echo {r..z}) $(echo {1..9}) $(echo {A..Z}))
4646
declare -x keycounter=0
47-
menuInit "Favorite locations"
48-
submenuHead "Locations:"
49-
if [ -n ${locations+x} ]; then
50-
for j in "${locations[@]}"
51-
do
52-
locationname=$(echo "$j" | cut -f1 -d'=')
53-
locationdir=$(echo "$j" | cut -f2 -d'=')
54-
menuItem "${thekeys[$keycounter]}" "$locationname" "toDirAndTerminate $locationdir"
55-
((keycounter++))
56-
done
57-
fi
58-
echo
59-
submenuHead "Workspaces:"
60-
if [ -n ${workspaces+x} ]; then
61-
for j in "${workspaces[@]}"
62-
do
63-
locationname=$(echo "$j" | cut -f1 -d'=')
64-
locationdir=$(echo "$j" | cut -f2 -d'=')
65-
menuItem "${thekeys[$keycounter]}" "$locationname" "toDir $locationdir"
66-
((keycounter++))
67-
done
68-
fi
47+
menuInit "GIT locations"
6948
echo
7049
uncached=false
7150
priorlocation=$(pwd) # remember actual location
@@ -88,6 +67,7 @@ fi
8867
eval cd "${priorlocation// /\\ }" # return to previous location
8968
# print out git location cache
9069
submenuHead "GIT repos inside workspaces:"
70+
echo
9171
for (( i = 0; i < ${#gitlocations[@]}; i++ )); do
9272
arrIN=(${gitlocations[$i]})
9373
IFSOLD=$IFS
@@ -97,14 +77,10 @@ for (( i = 0; i < ${#gitlocations[@]}; i++ )); do
9777
menuItem "${arrIN[0]}" "${arrIN[1]}" "${arrIN[2]} ${arrIN[3]}"
9878
done
9979
if $uncached; then coloredLog "NEW" "1;42"; else coloredLog "CACHED" "1;42"; fi
100-
echo
10180
submenuHead "Shortcuts"
10281
menuItem X "Purge git dir cache" purgDirCache
10382
echo
10483
menuItem q "Quit" quit
105-
echo
106-
coloredLog "$(pwd)" "1;44"
107-
10884
choice
10985

11086
unset locations workspaces

0 commit comments

Comments
 (0)