dotfiles misc
This commit is contained in:
@@ -106,3 +106,5 @@ if ! shopt -oq posix; then
|
|||||||
. /etc/bash_completion
|
. /etc/bash_completion
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
[ -f ~/.profile ] && source ~/.profile
|
||||||
|
|||||||
@@ -1,20 +1,18 @@
|
|||||||
[alias]
|
|
||||||
a = "add"
|
a = "add"
|
||||||
aa = "add --all" # add all unstaged into index
|
aa = "add --all" # add all unstaged into index
|
||||||
aliases = "config --get-regexp '^alias'" # show all aliases
|
aliases = "config --get-regexp '^alias.*'" # show all aliases
|
||||||
amend = "commit --amend --all --no-edit" # add new changes into last commit
|
amend = "commit --amend --all --no-edit" # add new changes into last commit
|
||||||
amendm = "commit --amend --all --message" # amend + edit commit message
|
amendm = "commit --amend --all --message" # amend + edit commit message
|
||||||
|
archive = "!f() { top=$(rev-parse --show-toplevel); cd $top; tar cvzf $top.tar.gz $top ; }; f" # make repo .tar.gz
|
||||||
b = "branch" #
|
b = "branch" #
|
||||||
bm = "branch --merged" # branches whose tips are reachable from commit or HEAD
|
bm = "branch --merged" # branches whose tips are reachable from commit or HEAD
|
||||||
bnm = "branch --no-merged" # branches whose tips are NOT reachable from commit or HEAD
|
bnm = "branch --no-merged" # branches whose tips are NOT reachable from commit or HEAD
|
||||||
|
br = "branch" #
|
||||||
branches = "branch -a"
|
branches = "branch -a"
|
||||||
; branches = "bvv"
|
|
||||||
brd = "branch -D" # force delete unmerged branch
|
brd = "branch -D" # force delete unmerged branch
|
||||||
brod = "!git branch -D "$1"; git push origin :"$1";" # brd + remove it from origin
|
brod = "!git branch -D "$1"; git push origin :"$1";" # brd + remove it from origin
|
||||||
bv = "branch -v" # show branch list with those last commits
|
bv = "branch -v" # show branch list with those last commits
|
||||||
bvv = "branch -vv" # bv + remote branches tracked by them
|
bvv = "branch -vv" # bv + remote branches tracked by them
|
||||||
|
|
||||||
c = "commit"
|
c = "commit"
|
||||||
ca = "commit --all" # stage all changes and make a commit (interative)
|
ca = "commit --all" # stage all changes and make a commit (interative)
|
||||||
cam = "commit --all --message" # ca + cm (non-interactive)
|
cam = "commit --all --message" # ca + cm (non-interactive)
|
||||||
@@ -31,9 +29,7 @@ cp = "cherry-pick"
|
|||||||
cpa = "cherry-pick --abort" # abort cherry-picking
|
cpa = "cherry-pick --abort" # abort cherry-picking
|
||||||
cpc = "cherry-pick --continue" # continue cherry-picking
|
cpc = "cherry-pick --continue" # continue cherry-picking
|
||||||
cpn = "cherry-pick --no-commit" # cherry-pick without commit
|
cpn = "cherry-pick --no-commit" # cherry-pick without commit
|
||||||
; cpnx = "cherry-pick --no-commit -x"
|
|
||||||
current-branch = "branch --show-current" #rev-parse --abbrev-ref HEAD
|
current-branch = "branch --show-current" #rev-parse --abbrev-ref HEAD
|
||||||
|
|
||||||
d = "diff"
|
d = "diff"
|
||||||
dc = "diff --cached" # show diff of staged files
|
dc = "diff --cached" # show diff of staged files
|
||||||
default-branch = "config init.defaultBranch" # get default branch name
|
default-branch = "config init.defaultBranch" # get default branch name
|
||||||
@@ -43,30 +39,23 @@ develop = "!git checkout develop && git pull" # quick switch on develop branch a
|
|||||||
discard = "checkout --" # удаляет изменения в файле
|
discard = "checkout --" # удаляет изменения в файле
|
||||||
dw = "diff --word-diff" # show word diff in unstaged files
|
dw = "diff --word-diff" # show word diff in unstaged files
|
||||||
dwc = "diff --word-diff --cached" # dc + dw
|
dwc = "diff --word-diff --cached" # dc + dw
|
||||||
|
empty="!git commit --allow-empty"
|
||||||
exec = "!exec"
|
exec = "!exec"
|
||||||
|
|
||||||
f = "fetch"
|
f = "fetch"
|
||||||
fa = "fetch --all" # fetch branches from all remotes
|
fa = "fetch --all" # fetch branches from all remotes
|
||||||
fuck = "!git checkout $(git default-branch) && git fetch origin --prune && git reset --hard origin/$(git default-branch) && git clean -ffd"
|
fuck = "!git checkout $(git default-branch) && git fetch origin --prune && git reset --hard origin/$(git default-branch) && git clean -ffd"
|
||||||
|
|
||||||
guser = "config --global --get-regexp '^user'" # show global user settings
|
guser = "config --global --get-regexp '^user'" # show global user settings
|
||||||
gzip = !"f() { top=$(rev-parse --show-toplevel); cd $top; tar cvzf $top.tar.gz $top ; }; f" # make repo .tar.gz
|
gwhoami = "guser"
|
||||||
|
gzip = "!f(){ top=$(rev-parse --show-toplevel); cd $top; tar cvzf $top.tar.gz $top};f" # make repo .tar.gz
|
||||||
head = "log -1 HEAD" # показать последний коммит в текущей ветке
|
head = "log -1 HEAD" # показать последний коммит в текущей ветке
|
||||||
heads = "log --graph --decorate --simplify-by-decoration --oneline" # show last commit of each branch as tree graph
|
heads = "log --graph --decorate --simplify-by-decoration --oneline" # show last commit of each branch as tree graph
|
||||||
|
|
||||||
inbound = "!git remote update --prune; git log ..@{upstream}" # get
|
inbound = "!git remote update --prune; git log ..@{upstream}" # get
|
||||||
init = "init -q"
|
init = "init -q"
|
||||||
|
|
||||||
l = "log"
|
l = "log"
|
||||||
; last-tag = "describe --tags --abbrev=0"
|
|
||||||
; last-tagged = "!git describe --tags $(git rev-list --tags --max-count=1)"
|
|
||||||
lo = "log --oneline"
|
lo = "log --oneline"
|
||||||
log-all = "log --graph --decorate --all"
|
log-all = "log --graph --decorate --all"
|
||||||
log-my = "!git log --author $(git config user.email)"
|
log-my = "!git log --author $(git config user.email)"
|
||||||
log-small = "log --graph --decorate --all --pretty=format:'%C(bold red)%h%C(reset) %C(bold blue)%an%C(reset) %C(green)%cr%C(reset) [%aD]%d%n%B'"
|
log-small = "log --graph --decorate --all --pretty=format:'%C(bold red)%h%C(reset) %C(bold blue)%an%C(reset) %C(green)%cr%C(reset) [%aD]%d%n%B'"
|
||||||
|
|
||||||
m = "merge"
|
m = "merge"
|
||||||
ma = "merge --abort" # abort merging
|
ma = "merge --abort" # abort merging
|
||||||
main = "!git checkout main && git pull" # quick switch on main branch and update it
|
main = "!git checkout main && git pull" # quick switch on main branch and update it
|
||||||
@@ -74,28 +63,20 @@ master = "!git checkout master && git pull" # quick switch on master branch and
|
|||||||
mc = "merge --continue" # continue merging
|
mc = "merge --continue" # continue merging
|
||||||
merged = "bm"
|
merged = "bm"
|
||||||
mn = "merge --no-commit" # merge without commit
|
mn = "merge --no-commit" # merge without commit
|
||||||
|
|
||||||
optimizer = "!git pruner; git repacker; git prune-packed"
|
optimizer = "!git pruner; git repacker; git prune-packed"
|
||||||
orphans = "fsck --full"
|
orphans = "fsck --full"
|
||||||
outbound = "log @{upstream}.."
|
outbound = "log @{upstream}.."
|
||||||
|
|
||||||
p = "pull"
|
p = "pull"
|
||||||
pf = "pull --force" # получить ветку принудительно
|
pf = "pull --force" # получить ветку принудительно
|
||||||
pft = "pull --force --tags" # получить теги
|
pft = "pull --force --tags" # получить теги
|
||||||
; ploh = "pull origin HEAD" # получить текущую ветку из origin
|
|
||||||
; pr = "!git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1" # github: встать на PR с указанным id
|
|
||||||
prs = "pull --recurse-submodules" # pull with submodules
|
prs = "pull --recurse-submodules" # pull with submodules
|
||||||
pruner = "!git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all"
|
pruner = "!git prune --expire=now; git reflog expire --expire-unreachable=now --rewrite --all"
|
||||||
pullf = "pull --force"
|
pullf = "pull --force"
|
||||||
pullft = "pull --force --tags"
|
pullft = "pull --force --tags"
|
||||||
pullt = "pull --tags" # получить теги
|
pullt = "pull --tags" # получить теги
|
||||||
pushf = "!git push --force" # отправить ветку принудительно
|
pushf = "!git push --force" # отправить ветку принудительно
|
||||||
; pushf = "!git push --force --set-upstream origin $(git current-branch)" # отправить ветку принудительно
|
|
||||||
pushft = "!git push --tags --force" # отправить теги принудительно
|
pushft = "!git push --tags --force" # отправить теги принудительно
|
||||||
; pushft = "!git push --tags --force --set-upstream origin $(git current-branch)" # отправить теги принудительно
|
|
||||||
pusht = "!git push --tags" # отправить теги
|
pusht = "!git push --tags" # отправить теги
|
||||||
; pusht = "!git push --tags --set-upstream origin $(git current-branch)" # отправить теги
|
|
||||||
|
|
||||||
r = "reset"
|
r = "reset"
|
||||||
rb = "rebase"
|
rb = "rebase"
|
||||||
rba = "rebase --abort"
|
rba = "rebase --abort"
|
||||||
@@ -124,12 +105,33 @@ rsh = "reset --soft HEAD" # откат коммита с сохранением
|
|||||||
rso = "remote show origin" # показать состояние локальных веток относительно удалённых на origin bare
|
rso = "remote show origin" # показать состояние локальных веток относительно удалённых на origin bare
|
||||||
rv = "revert"
|
rv = "revert"
|
||||||
rvn = "revert --no-commit"
|
rvn = "revert --no-commit"
|
||||||
|
|
||||||
s = "status"
|
s = "status"
|
||||||
sb = "show-branch"
|
sb = "show-branch"
|
||||||
|
st = "status"
|
||||||
start = "!git init -q && git commit --allow-empty -m 'Initial commit'"
|
start = "!git init -q && git commit --allow-empty -m 'Initial commit'"
|
||||||
stashes = "stash list" # show stashed changes
|
stashes = "stash list" # show stashed changes
|
||||||
sub = "submodule"
|
sub = "submodule"
|
||||||
|
tags = "tag -n1 --list" # shot tag names and commit message
|
||||||
|
targz = "archive"
|
||||||
|
trim = "!DEFAULT=$(git default-branch); git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; git remote prune origin;"
|
||||||
|
uncommit = "rs HEAD~1"
|
||||||
|
undo = "uncommit"
|
||||||
|
unstage = "reset HEAD" # staged file => unstaged
|
||||||
|
upstream-branch = "!git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)"
|
||||||
|
user = "config --local --get-regexp '^user'" # show local user settings (in current repo)
|
||||||
|
whoami = "user"
|
||||||
|
wip = "!git add . && git commit -am 'WIP'"
|
||||||
|
wipa = "!git add . && git commit --amend -am 'WIP'"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
; branches = "bvv"
|
||||||
|
; cpnx = "cherry-pick --no-commit -x"
|
||||||
|
; last-tag = "describe --tags --abbrev=0"
|
||||||
|
; last-tagged = "!git describe --tags $(git rev-list --tags --max-count=1)"
|
||||||
|
; ploh = "pull origin HEAD" # получить текущую ветку из origin
|
||||||
|
; pr = "!git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1" # github: встать на PR с указанным id
|
||||||
; sa = "submodule add"
|
; sa = "submodule add"
|
||||||
; sdi = "submodule deinit -f"
|
; sdi = "submodule deinit -f"
|
||||||
; si = "submodule init"
|
; si = "submodule init"
|
||||||
@@ -137,15 +139,3 @@ sub = "submodule"
|
|||||||
; sst = "submodule status"
|
; sst = "submodule status"
|
||||||
; sup = "submodule update"
|
; sup = "submodule update"
|
||||||
; sy = "remote update origin --prune"
|
; sy = "remote update origin --prune"
|
||||||
|
|
||||||
tags = "tag -n1 --list" # shot tag names and commit message
|
|
||||||
trim = "!DEFAULT=$(git default-branch); git branch --merged ${1-$DEFAULT} | grep -v " ${1-$DEFAULT}$" | xargs git branch -d; git remote prune origin;"
|
|
||||||
|
|
||||||
uncommit = "rs HEAD~1"
|
|
||||||
unstage = "reset HEAD" # staged file => unstaged
|
|
||||||
;unwip = "reset --mixed HEAD~"
|
|
||||||
upstream-branch = "!git for-each-ref --format='%(upstream:short)' $(git symbolic-ref -q HEAD)"
|
|
||||||
user = "config --local --get-regexp '^user'" # show local user settings (in current repo)
|
|
||||||
|
|
||||||
wip = "!git add . && git commit -am 'WIP'"
|
|
||||||
wipa = "!git add . && git commit --amend -am 'WIP'"
|
|
||||||
|
|||||||
1
dotfiles/.gitignore
vendored
1
dotfiles/.gitignore
vendored
@@ -2,3 +2,4 @@
|
|||||||
Desktop.ini
|
Desktop.ini
|
||||||
._*
|
._*
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
|
nbproject/
|
||||||
|
|||||||
@@ -28,26 +28,36 @@ fi
|
|||||||
|
|
||||||
### AAA ##########################################
|
### AAA ##########################################
|
||||||
|
|
||||||
if [ -f ~/.bash_aliases ]; then
|
[ -f ~/.bash_aliases ] && source ~/.bash_aliases
|
||||||
. ~/.bash_aliases
|
[ -f ~/bars/src/lis-docker/.bash_aliases ] && source ~/bars/src/lis-docker/.bash_aliases
|
||||||
fi
|
|
||||||
|
|
||||||
export LD_LIBRARY_PATH="/opt/oci"
|
|
||||||
# export NLS_LANG='RUSSIAN_RUSSIA.AL32UTF8'
|
|
||||||
# export NLS_DATE_FORMAT='DD.MM.YYYY'
|
|
||||||
# export NLS_CURRENCY='р.'
|
|
||||||
# export NLS_DUAL_CURRENCY='р.'
|
|
||||||
# export NLS_CALENDAR='GREGORIAN'
|
|
||||||
# export NLS_ISO_CURRENCY='RUSSIA'
|
|
||||||
|
|
||||||
export JAVA_HOME="/usr/bin/"
|
|
||||||
export ANDROID_SDK_ROOT="$HOME/android/sdk"
|
|
||||||
export LITE_SCALE=1 # workaround https://github.com/lite-xl/lite-xl/issues/1173
|
export LITE_SCALE=1 # workaround https://github.com/lite-xl/lite-xl/issues/1173
|
||||||
|
|
||||||
export PATH="$HOME/.local/share/JetBrains/Toolbox/scripts:$HOME/.config/composer/vendor/bin:$PATH"
|
export JAVA_HOME="/usr/bin/"
|
||||||
|
export PATH="/opt/nvim-linux64/bin:$PATH"
|
||||||
|
export PATH="$HOME/.local/bin/:$PATH"
|
||||||
|
export PATH="$HOME/.local/share/JetBrains/Toolbox/scripts:$PATH"
|
||||||
|
export PATH="$(composer config -g home)/vendor/bin:$PATH"
|
||||||
|
|
||||||
|
# phpbrew
|
||||||
|
# export PHPBREW_SET_PROMPT=1
|
||||||
|
# export PHPBREW_RC_ENABLE=1
|
||||||
|
# [ -f ~/.phpbrew/bashrc ] && source ~/.phpbrew/bashrc
|
||||||
|
|
||||||
|
# golang
|
||||||
|
export PATH="/usr/local/go/bin:$PATH"
|
||||||
|
export GOPATH="$HOME/.go"
|
||||||
|
|
||||||
|
# rust cargo
|
||||||
|
[ -f ~/.cargo/env ] && source ~/.cargo/env
|
||||||
|
|
||||||
|
# nvm
|
||||||
|
# export NVM_DIR="$HOME/.nvm"
|
||||||
|
# [ -s "$NVM_DIR/nvm.sh" ] && source "$NVM_DIR/nvm.sh" # This loads nvm
|
||||||
|
# [ -s "$NVM_DIR/bash_completion" ] && source "$NVM_DIR/bash_completion" # This loads nvm bash_completion
|
||||||
|
|
||||||
# The next line updates PATH for Yandex Cloud CLI.
|
# The next line updates PATH for Yandex Cloud CLI.
|
||||||
if [ -f "$HOME/yandex-cloud/path.bash.inc" ]; then source "$HOME/yandex-cloud/path.bash.inc"; fi
|
[ -f "$HOME/yandex-cloud/path.bash.inc" ] && source "$HOME/yandex-cloud/path.bash.inc"
|
||||||
|
|
||||||
# The next line enables shell command completion for yc.
|
# The next line enables shell command completion for yc.
|
||||||
if [ -f "$HOME/yandex-cloud/completion.zsh.inc" ]; then source "$HOME/yandex-cloud/completion.zsh.inc"; fi
|
[ -f "$HOME/yandex-cloud/completion.zsh.inc" ] && source "$HOME/yandex-cloud/completion.zsh.inc"
|
||||||
|
|||||||
Reference in New Issue
Block a user