File tree Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Expand file tree Collapse file tree 4 files changed +13
-2
lines changed Original file line number Diff line number Diff line change
1
+ .curr
Original file line number Diff line number Diff line change 26
26
27
27
# codespaces automatically takes you into that repo.
28
28
# else, lets start in the root of our workspaces directory (the w alias)
29
- if [ -z " ${CODESPACES} " ]; then
29
+ # on reload keep same dir (it writes a .curr file)
30
+ if [ -f " ${DOT_FILES_PATH} /.curr" ]; then
31
+ curr_dir=$( cat " ${DOT_FILES_PATH} /.curr" )
32
+ cd " ${curr_dir} "
33
+ rm .curr
34
+ elif [ -z " ${CODESPACES} " ]; then
30
35
w
31
36
fi
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ alias all="echo;alias;echo"
4
4
alias c=" tput reset"
5
5
6
6
# Reload the shell (i.e. invoke as a login shell)
7
- alias reload=" exec ${SHELL} -l "
7
+ alias reload=" dot_reload "
8
8
alias tools=" dot_tool_versions"
9
9
alias me=" dot_tool_whoami"
10
10
alias setsec=" dot_set_secret"
Original file line number Diff line number Diff line change @@ -61,4 +61,9 @@ function dot_list_secrets() {
61
61
file=${entry##*/ }
62
62
echo ${file% .* }
63
63
done
64
+ }
65
+
66
+ function dot_reload() {
67
+ echo " $( pwd) " > " ${DOT_FILES_PATH} /.curr"
68
+ exec ${SHELL} -l
64
69
}
You can’t perform that action at this time.
0 commit comments