File tree Expand file tree Collapse file tree 4 files changed +2
-25
lines changed Expand file tree Collapse file tree 4 files changed +2
-25
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ Structure
23
23
* Sets up the PS1
24
24
* Sets up aliases
25
25
* Sets up some bash-specific variables.
26
- * Prepares the ` _lastdir ` functions for saving last directory on logout.
27
26
* ` profile ` - Environment variables for all POSIX login shells
28
27
* Sets up ` $PATH ` and ` $MANPATH ` :
29
28
* Ignores lines starting with ` # ` .
@@ -36,9 +35,9 @@ Structure
36
35
* Sets up ` $TZ ` and some common history variables.
37
36
* Sources ` profile.d ` .
38
37
* ` skel ` - ` $HOME ` Skeleton. Contains what we think is good for most users.
39
- * ` .bashrc ` - User bash startup, sources ` /etc/bashrc ` , runs ` _lastdir_go ` .
38
+ * ` .bashrc ` - User bash startup, sources ` /etc/bashrc ` .
40
39
* ` .bash_profile ` - User bash login, sources ` ~/.bashrc ` .
41
- * ` .bash_logout ` - User bash logout, runs ` _lastdir_rec ` .
40
+ * ` .bash_logout ` - User bash logout.
42
41
* ` bashrc.d ` - Files sourced by ` /etc/bashrc ` .
43
42
* ` 20-vcs ` - VCS aliases and PS1. Provides ` _vcs_status ` .
44
43
* ` .vcs_* ` - VCS Implementations.
Original file line number Diff line number Diff line change @@ -108,24 +108,6 @@ _is_posix || which(){ (alias; declare -F) | /usr/bin/which -i --read-functions "
108
108
# Misc stuffs
109
109
FIGNORE=' ~'
110
110
TIMEFORMAT=$' \n real\t %3lR\t %P%%\n user\t %3lU\n sys\t %3lS'
111
- # Last directory recoding measure.
112
- _lastdir_go () {
113
- if [ -s ~ /.last_directory ]; then
114
- if [ -d $( cat ~ /.last_directory) ]; then
115
- echo -e " $YELLOW >>>\t${CYAN} Returning you to the last directory...$NORMAL \` $( cat ~ /.last_directory) '"
116
- cd $( cat ~ /.last_directory)
117
- else
118
- echo -e " $YELLOW >>>\t${CYAN} Last recorded directory cannot be accessed or was already removed.$NORMAL "
119
- fi
120
- fi
121
- }
122
-
123
- _lastdir_rec () {
124
- local _ret=$? # Return value transparency is actually important here
125
- echo -ne " $YELLOW >>>\t\033[36mRecording your current working directory...\033[0m"
126
- pwd > ~ /.last_directory
127
- return $_ret
128
- }
129
111
130
112
unset script shopt
131
113
# End /etc/bashrc
Original file line number Diff line number Diff line change 2
2
# Written for Beyond Linux From Scratch
3
3
# by James Robertson <[email protected] >
4
4
5
- # Personal items to perform on logout.
6
- _lastdir_rec
7
5
# End ~/.bash_logout
Original file line number Diff line number Diff line change @@ -13,6 +13,4 @@ if [ -f "/etc/bashrc" ] ; then
13
13
source /etc/bashrc
14
14
fi
15
15
16
- # Restores last directory state.
17
- _lastdir_go
18
16
# End ~/.bashrc
You can’t perform that action at this time.
0 commit comments