-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy path.bashrc
More file actions
26 lines (23 loc) · 867 Bytes
/
.bashrc
File metadata and controls
26 lines (23 loc) · 867 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# This file is for environments where it's not possible to change the login shell with chsh.
# Do not use this if you can change your login shell.
# Check that the session is interactive.
# https://askubuntu.com/a/1491731
if [[ $- == *i* ]]; then
if command -v zsh &> /dev/null; then
# https://askubuntu.com/a/1292415
export SHELL=$(which zsh)
# https://stackoverflow.com/a/10341338
# https://askubuntu.com/a/525787
if [[ -o login ]]; then
exec zsh -l
else
exec zsh
fi
# The exec command replaces the current shell and therefore terminates the reading of this file.
# if [ $? -eq 0 ]; then
# return 0
# else
# echo "There was an issue in running zsh. Please check your configuration. Dropping to bash shell."
# fi
fi
fi