mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-11-05 11:18:45 +00:00
Add autocd
This commit is contained in:
@@ -11,6 +11,7 @@ HISTCONTROL=ignoreboth
|
|||||||
|
|
||||||
# append to the history file, don't overwrite it
|
# append to the history file, don't overwrite it
|
||||||
shopt -s histappend
|
shopt -s histappend
|
||||||
|
shopt -s autocd
|
||||||
|
|
||||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||||
HISTSIZE=1000
|
HISTSIZE=1000
|
||||||
@@ -137,7 +138,7 @@ NewLine="\n"
|
|||||||
Jobs="\j"
|
Jobs="\j"
|
||||||
|
|
||||||
if [ "$color_prompt" = yes ]; then
|
if [ "$color_prompt" = yes ]; then
|
||||||
PS1=$Time12h$Color_Off'$(git branch &>/dev/null;\
|
PS1='$(git branch &>/dev/null;\
|
||||||
if [ $? -eq 0 ]; then \
|
if [ $? -eq 0 ]; then \
|
||||||
echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
|
echo "$(echo `git status` | grep "nothing to commit" > /dev/null 2>&1; \
|
||||||
if [ "$?" -eq "0" ]; then \
|
if [ "$?" -eq "0" ]; then \
|
||||||
@@ -146,10 +147,10 @@ if [ $? -eq 0 ]; then \
|
|||||||
else \
|
else \
|
||||||
# @5 - Changes to working tree
|
# @5 - Changes to working tree
|
||||||
echo "'$BGreen$PathShort$IRed'"$(__git_ps1 " (%s)"); \
|
echo "'$BGreen$PathShort$IRed'"$(__git_ps1 " (%s)"); \
|
||||||
fi) '$BWhite'\$:'$Color_Off' "; \
|
fi)'$BWhite':'$Color_Off' "; \
|
||||||
else \
|
else \
|
||||||
# @2 - Prompt when not in GIT repo
|
# @2 - Prompt when not in GIT repo
|
||||||
echo " '$BGreen$PathShort$BWhite' \$:'$Color_Off' "; \
|
echo "'$BGreen$PathShort$BWhite':'$Color_Off' "; \
|
||||||
fi)'
|
fi)'
|
||||||
else
|
else
|
||||||
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
|
||||||
|
|||||||
Reference in New Issue
Block a user