mirror of
https://github.com/GeorgeSG/dotfiles.git
synced 2026-09-04 00:18:44 +00:00
Move to bash_profile
This commit is contained in:
+100
-1
@@ -1 +1,100 @@
|
||||
source ~/.bashrc
|
||||
# Set prompt
|
||||
IFS='.' read -ra split_hostname <<<$(hostname | tr '[:upper:]' '[:lower:]')
|
||||
HOSTNAME=${split_hostname[0]}
|
||||
PS1='\[\e[1;4;36m\]$HOSTNAME\[\e[1;0m\] \[\e[1;32m\]\w\[\e[m\]\[\e[1;0m\] \[\e[0m\] \[\e[1;0m\]'
|
||||
export TERM=xterm-256color
|
||||
|
||||
shopt -s cdspell
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Enable some Bash 4 features when possible:
|
||||
# * `autocd`, e.g. `**/qux` will enter `./foo/bar/baz/qux`
|
||||
# * Recursive globbing, e.g. `echo **/*.txt`
|
||||
for option in autocd globstar; do
|
||||
shopt -s "$option" 2> /dev/null;
|
||||
done;
|
||||
|
||||
# Disable Caret-C output
|
||||
stty -ctlecho
|
||||
|
||||
set -o vi
|
||||
bind -m vi-insert "\C-l":clear-screen
|
||||
|
||||
#so as not to be disturbed by Ctrl-S ctrl-Q in terminals:
|
||||
stty -ixon
|
||||
|
||||
######################
|
||||
# History Management #
|
||||
######################
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=5000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
######################
|
||||
# Aliases #
|
||||
######################
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ls='ls -hG'
|
||||
alias ll='ls -alhFG'
|
||||
alias la='ls -AG'
|
||||
alias l='ls -CFG'
|
||||
|
||||
# Editor
|
||||
export EDITOR='code -w'
|
||||
|
||||
# bash-git-prompt
|
||||
GIT_PROMPT_ONLY_IN_REPO=1
|
||||
GIT_PROMPT_START="\[\e[1;4;36m\]$HOSTNAME\[\e[1;0m\] \[\e[1;32m\]\w\[\e[m\]"
|
||||
GIT_PROMPT_END="\[\e[1;m\] \[\e[1;m\]"
|
||||
|
||||
|
||||
# Disable deprecation warning on mac
|
||||
export BASH_SILENCE_DEPRECATION_WARNING=1
|
||||
|
||||
######################
|
||||
# Sources & exports #
|
||||
######################
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
source ~/.bash_aliases
|
||||
fi
|
||||
|
||||
if [ -f ~/.bash_profile.local ]; then
|
||||
source ~/.bash_profile.local
|
||||
fi
|
||||
|
||||
# bash-git prompt
|
||||
if [ -f ~/.bash-git-prompt/gitprompt.sh ]; then
|
||||
source ~/.bash-git-prompt/gitprompt.sh
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Git completion
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
source ~/.git-completion.bash
|
||||
fi
|
||||
|
||||
@@ -1,93 +0,0 @@
|
||||
# Set prompt
|
||||
IFS='.' read -ra split_hostname <<<$(hostname | tr '[:upper:]' '[:lower:]')
|
||||
HOSTNAME=${split_hostname[0]}
|
||||
PS1='\[\e[1;4;36m\]$HOSTNAME\[\e[1;0m\] \[\e[1;32m\]\w\[\e[m\]\[\e[1;0m\] \[\e[0m\] \[\e[1;0m\]'
|
||||
export TERM=xterm-256color
|
||||
|
||||
shopt -s cdspell
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
shopt -s checkwinsize
|
||||
|
||||
# Disable Caret-C output
|
||||
stty -ctlecho
|
||||
|
||||
set -o vi
|
||||
bind -m vi-insert "\C-l":clear-screen
|
||||
|
||||
#so as not to be disturbed by Ctrl-S ctrl-Q in terminals:
|
||||
stty -ixon
|
||||
|
||||
######################
|
||||
# History Management #
|
||||
######################
|
||||
|
||||
# append to the history file, don't overwrite it
|
||||
shopt -s histappend
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=5000
|
||||
HISTFILESIZE=2000
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
######################
|
||||
# Aliases #
|
||||
######################
|
||||
|
||||
# enable color support of ls and also add handy aliases
|
||||
if [ -x /usr/bin/dircolors ]; then
|
||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
||||
alias grep='grep --color=auto'
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
# some more ls aliases
|
||||
alias ls='ls -hG'
|
||||
alias ll='ls -alhFG'
|
||||
alias la='ls -AG'
|
||||
alias l='ls -CFG'
|
||||
|
||||
# Editor
|
||||
export EDITOR='code -w'
|
||||
|
||||
# bash-git-prompt
|
||||
GIT_PROMPT_ONLY_IN_REPO=1
|
||||
GIT_PROMPT_START="\[\e[1;4;36m\]$HOSTNAME\[\e[1;0m\] \[\e[1;32m\]\w\[\e[m\]"
|
||||
GIT_PROMPT_END="\[\e[1;m\] \[\e[1;m\]"
|
||||
|
||||
|
||||
# Disable deprecation warning on mac
|
||||
export BASH_SILENCE_DEPRECATION_WARNING=1
|
||||
|
||||
######################
|
||||
# Sources & exports #
|
||||
######################
|
||||
|
||||
if [ -f ~/.bash_aliases ]; then
|
||||
source ~/.bash_aliases
|
||||
fi
|
||||
|
||||
if [ -f ~/.bashrc.local ]; then
|
||||
source ~/.bashrc.local
|
||||
fi
|
||||
|
||||
# bash-git prompt
|
||||
if [ -f ~/.bash-git-prompt/gitprompt.sh ]; then
|
||||
source ~/.bash-git-prompt/gitprompt.sh
|
||||
fi
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if [ -f /etc/bash_completion ] && ! shopt -oq posix; then
|
||||
source /etc/bash_completion
|
||||
fi
|
||||
|
||||
# Git completion
|
||||
if [ -f ~/.git-completion.bash ]; then
|
||||
source ~/.git-completion.bash
|
||||
fi
|
||||
+24
-12
@@ -6,7 +6,24 @@
|
||||
status = auto
|
||||
branch = auto
|
||||
interactive = auto
|
||||
ui = true
|
||||
ui = auto
|
||||
[help]
|
||||
# Automatically correct and execute mistyped commands.
|
||||
autocorrect = 1
|
||||
[branch]
|
||||
# Show most recently changed branches first.
|
||||
sort = -committerdate
|
||||
[push]
|
||||
default = simple
|
||||
autoSetupRemote = true
|
||||
[diff]
|
||||
tool = default-difftool
|
||||
[difftool "default-difftool"]
|
||||
cmd = code --wait --diff $LOCAL $REMOTE
|
||||
[filter "media"]
|
||||
clean = git media clean %f
|
||||
smudge = git media smudge %f
|
||||
required = true
|
||||
[alias]
|
||||
# Shorten some often used commands
|
||||
b = branch
|
||||
@@ -38,14 +55,9 @@
|
||||
lol = log --graph --decorate --pretty=oneline --abbrev-commit
|
||||
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
|
||||
ll = log --graph --date=short
|
||||
[push]
|
||||
default = simple
|
||||
autoSetupRemote = true
|
||||
[diff]
|
||||
tool = default-difftool
|
||||
[difftool "default-difftool"]
|
||||
cmd = code --wait --diff $LOCAL $REMOTE
|
||||
[filter "media"]
|
||||
clean = git media clean %f
|
||||
smudge = git media smudge %f
|
||||
required = true
|
||||
|
||||
# List contributors with number of commits.
|
||||
contributors = shortlog --summary --numbered
|
||||
|
||||
# Show the user email for the current repository.
|
||||
whoami = config user.email
|
||||
|
||||
@@ -4,6 +4,7 @@ macos: link bash_git_prompt brew cask tmux vim
|
||||
link:
|
||||
-ln -s ~/Git/dotfiles/.bash_aliases ~
|
||||
-ln -s ~/Git/dotfiles/.bashrc ~
|
||||
-ln -s ~/Git/dotfiles/.bash_profile ~
|
||||
-ln -s ~/Git/dotfiles/.git-completion.bash ~
|
||||
-ln -s ~/Git/dotfiles/.gitconfig ~
|
||||
-ln -s ~/Git/dotfiles/.tmux.conf ~
|
||||
|
||||
+16
-14
@@ -1,18 +1,20 @@
|
||||
tap 'homebrew/bundle'
|
||||
|
||||
brew 'bash'
|
||||
brew 'bash-git-prompt'
|
||||
brew 'bitwarden-cli'
|
||||
brew 'coreutils'
|
||||
brew 'docker'
|
||||
brew 'youtube-dl'
|
||||
brew 'wget'
|
||||
brew 'tree'
|
||||
brew 'tmux'
|
||||
brew 'thefuck'
|
||||
brew 'nvm'
|
||||
brew 'jq'
|
||||
brew 'iperf3'
|
||||
brew 'htop'
|
||||
brew 'gnupg'
|
||||
brew 'git'
|
||||
brew 'gh'
|
||||
brew 'htop'
|
||||
brew 'iperf3'
|
||||
brew 'jq'
|
||||
brew 'nvm'
|
||||
brew 'thefuck'
|
||||
brew 'tmux'
|
||||
brew 'tree'
|
||||
brew 'wget'
|
||||
brew 'youtube-dl'
|
||||
brew 'findutils'
|
||||
brew 'docker'
|
||||
brew 'coreutils'
|
||||
brew 'bitwarden-cli'
|
||||
brew 'bash-git-prompt'
|
||||
brew 'bash'
|
||||
|
||||
Reference in New Issue
Block a user