Extended .bashrc.d configuration.
This commit is contained in:
parent
ba2ba061ad
commit
7a99efad19
10
dot_bashrc.d/executable_00.bash.init
Normal file
10
dot_bashrc.d/executable_00.bash.init
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# Bash Options
|
||||||
|
HISTCONTROL=ignoredups:ignorespace
|
||||||
|
HISTSIZE=3000
|
||||||
|
HISTFILESIZE=3000
|
||||||
|
export HISTTIMEFORMAT="%Y-%m-%d %H:%M:%S "
|
||||||
|
export HISTIGNORE=$'[ \t]*:&:[fb]g:exit:ls:ll:cd:pwd:history:z'
|
||||||
|
|
||||||
|
# inspired (but not all commands used) by https://github.com/jdcapa/bashrc.d/blob/main/00.bash.init
|
||||||
22
dot_bashrc.d/executable_03.ENV
Executable file
22
dot_bashrc.d/executable_03.ENV
Executable file
@ -0,0 +1,22 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
# BINs and PATH
|
||||||
|
# extend path if directory exists and is not yet contained
|
||||||
|
# https://askubuntu.com/questions/432217/prevent-duplicate-entries-in-path
|
||||||
|
function extendPath() {
|
||||||
|
local new_dir=$1
|
||||||
|
if [ -d "$new_dir" ]; then
|
||||||
|
[[ ":$PATH:" =~ :$new_dir: ]] || PATH="$new_dir:$PATH"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ -x /usr/bin/go ]; then
|
||||||
|
extendPath "$(go env GOPATH)/bin"
|
||||||
|
export GOPATH=$(go env GOPATH)
|
||||||
|
fi
|
||||||
|
|
||||||
|
extendPath "$HOME/bin"
|
||||||
|
extendPath "/usr/local/bin"
|
||||||
|
extendPath "$HOME/.local/bin"
|
||||||
|
|
||||||
|
export PATH
|
||||||
@ -3,6 +3,25 @@
|
|||||||
# navigation
|
# navigation
|
||||||
alias ..='cd ..'
|
alias ..='cd ..'
|
||||||
alias ...='cd ../..'
|
alias ...='cd ../..'
|
||||||
|
alias ....='cd ../../..'
|
||||||
|
|
||||||
|
# ls aliases
|
||||||
|
alias ll='ls -l --group-directories-first'
|
||||||
|
alias ls='ls -hF --color' # add colors for filetype recognition
|
||||||
|
alias lo='ls -o' # without group information
|
||||||
|
alias lr='ls -lrt'
|
||||||
|
alias la='ls -Al' # show hidden files
|
||||||
|
alias lx='ls -lXB' # sort by extension
|
||||||
|
alias lk='ls -lSr' # sort by size, biggest last
|
||||||
|
alias lc='ls -ltcr' # sort by and show change time, most recent last
|
||||||
|
alias lu='ls -ltur' # sort by and show access time, most recent last
|
||||||
|
alias lt='ls -ltr' # sort by date, most recent last
|
||||||
|
alias lm='ls -al |more' # pipe through 'more'
|
||||||
|
alias l='ls -CF'
|
||||||
|
alias lsd='ls -l | grep "^d"' #list only directories
|
||||||
|
|
||||||
|
# git shortcut
|
||||||
|
alias gg='git graph'
|
||||||
|
|
||||||
# tail alias
|
# tail alias
|
||||||
alias tailer="tail --follow=name --retry"
|
alias tailer="tail --follow=name --retry"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user