mirror of
https://github.com/pgrondek/config.git
synced 2024-11-26 05:35:30 +00:00
[bash] few changes
separate local aliases remove running bash in screen on servers
This commit is contained in:
parent
f7e23be95d
commit
20b5be4f66
14
bash/.bash_aliases
Normal file
14
bash/.bash_aliases
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
# This file is copy from repo config
|
||||||
|
# To define local only aliases use ~/.bash_aliases2
|
||||||
|
|
||||||
|
alias ll='ls -AlFh'
|
||||||
|
alias la='ls -A'
|
||||||
|
alias l='ls -CF'
|
||||||
|
|
||||||
|
alias home='cd ~'
|
||||||
|
alias root='cd /'
|
||||||
|
|
||||||
|
alias q=exit
|
||||||
|
alias open=xdg-open
|
||||||
|
|
||||||
|
alias jar='java -jar'
|
@ -1,4 +1,4 @@
|
|||||||
BASH_ALIASES=bash_aliases
|
BASH_ALIASES=.bash_aliases
|
||||||
BASH_ALIASES_OUT=$(HOME)/.bash_aliases
|
BASH_ALIASES_OUT=$(HOME)/.bash_aliases
|
||||||
BASHRC=bashrc
|
BASHRC=bashrc
|
||||||
BASHRC_OUT=$(HOME)/.bashrc
|
BASHRC_OUT=$(HOME)/.bashrc
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
alias home='cd ~'
|
|
||||||
alias root='cd /'
|
|
||||||
|
|
||||||
alias q=exit
|
|
||||||
alias open=xdg-open
|
|
||||||
|
|
||||||
alias jar='java -jar'
|
|
1
bash/bash_aliases
Symbolic link
1
bash/bash_aliases
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
.bash_aliases
|
26
bash/bashrc
26
bash/bashrc
@ -109,11 +109,6 @@ fi
|
|||||||
# colored GCC warnings and errors
|
# colored GCC warnings and errors
|
||||||
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
#export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
||||||
|
|
||||||
# some more ls aliases
|
|
||||||
alias ll='ls -alFh'
|
|
||||||
alias la='ls -A'
|
|
||||||
alias l='ls -CF'
|
|
||||||
|
|
||||||
# Add an "alert" alias for long running commands. Use like so:
|
# Add an "alert" alias for long running commands. Use like so:
|
||||||
# sleep 10; alert
|
# sleep 10; alert
|
||||||
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
|
||||||
@ -122,11 +117,15 @@ alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo
|
|||||||
# You may want to put all your additions into a separate file like
|
# You may want to put all your additions into a separate file like
|
||||||
# ~/.bash_aliases, instead of adding them here directly.
|
# ~/.bash_aliases, instead of adding them here directly.
|
||||||
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
# See /usr/share/doc/bash-doc/examples in the bash-doc package.
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
if [ -f ~/.bash_aliases ]; then
|
||||||
. ~/.bash_aliases
|
. ~/.bash_aliases
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Local defined aliases
|
||||||
|
if [ -f ~/.bash_aliases2 ]; then
|
||||||
|
. ~/.bash_aliases2
|
||||||
|
fi
|
||||||
|
|
||||||
# enable programmable completion features (you don't need to enable
|
# enable programmable completion features (you don't need to enable
|
||||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||||
# sources /etc/bash.bashrc).
|
# sources /etc/bash.bashrc).
|
||||||
@ -138,7 +137,7 @@ if ! shopt -oq posix; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#THIS MUST BE AT THE END OF THE FILE FOR SDKMAN TO WORK!!!
|
# sdkman configuration if present
|
||||||
if [ -d ~/.sdkman ]; then
|
if [ -d ~/.sdkman ]; then
|
||||||
export SDKMAN_DIR="$HOME/.sdkman"
|
export SDKMAN_DIR="$HOME/.sdkman"
|
||||||
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
[[ -s "$HOME/.sdkman/bin/sdkman-init.sh" ]] && source "$HOME/.sdkman/bin/sdkman-init.sh"
|
||||||
@ -146,16 +145,3 @@ fi
|
|||||||
|
|
||||||
export VISUAL=vim
|
export VISUAL=vim
|
||||||
export EDITOR="$VISUAL"
|
export EDITOR="$VISUAL"
|
||||||
|
|
||||||
# Start all sessions in screen when running on server
|
|
||||||
if [ "$computer_type" == "server" ]; then
|
|
||||||
if [ -d /usr/bin/screen ]; then
|
|
||||||
echo Server
|
|
||||||
if [ -z "$STY" ]; then
|
|
||||||
screen -R;
|
|
||||||
exit
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
echo "Warning, no screen binary found"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
Loading…
Reference in New Issue
Block a user