This commit is contained in:
Marc Beninca 2023-05-14 16:00:34 +02:00
parent 2520fbee34
commit 4ce6077f23
20 changed files with 0 additions and 0 deletions

23
bash/alias/apt.sh Normal file
View file

@ -0,0 +1,23 @@
# show package information
alias ac='apt-cache show'
# search package
alias acs='apt-cache search'
# package versions policy
alias acp='apt-cache policy'
# update packages catalog
alias agud='apt-get update'
# upgrade forbidding package installation or removal
alias agug='apt-get upgrade'
# upgrade allowing package installation or removal
alias agdu='apt-get dist-upgrade'
# install packages
alias agi='apt-get install'
# clean packages cache
alias agc='apt-get clean;apt-get autoremove'

1
bash/alias/batcat.sh Normal file
View file

@ -0,0 +1 @@
alias bat='batcat'

7
bash/alias/byobu.sh Normal file
View file

@ -0,0 +1,7 @@
alias bb='byobu'
alias bba='byobu attach-session'
alias bbl='byobu ls'
alias bbn='byobu new-session -d'

5
bash/alias/chmod.sh Normal file
View file

@ -0,0 +1,5 @@
# change mode as directory
alias cmd='chmod 755'
# change mode as file
alias cmf='chmod 644'

5
bash/alias/chown.sh Normal file
View file

@ -0,0 +1,5 @@
# change owner as root
alias cor='chown 0:0'
# change owner as user
alias cou='chown 1000:1000'

2
bash/alias/clear.sh Normal file
View file

@ -0,0 +1,2 @@
# clear terminal
alias c='clear'

190
bash/alias/git.sh Normal file
View file

@ -0,0 +1,190 @@
# add to index
alias ga='git add'
# add all to index
alias gaa='git add --all'
# create a branch
alias gb='git branch'
# delete a branch
alias gbd='git branch --delete'
# force a branch deletion
alias gbdf='git branch --delete --force'
# list branches
alias gbl='git branch --all --list --verbose --verbose'
# set the link to a remote branch from a local branch
alias gbu='git branch -u'
# clone a remote repository
alias gc='git clone'
# clean untracked files
alias gcf='git clean -d --force'
# index all and commit
alias gacm='git add --all;git commit -m'
# commit the index
alias gcm='git commit -m'
# redo the last commit with a different message
alias gcma='git commit --amend -m'
# make a root commit
alias gcmr='git commit --allow-empty --allow-empty-message -m ""'
# commit the index and sign
alias gcms='git commit --gpg-sign -m'
# switch to a branch or checkout file(s) from a commit
alias gco='git checkout'
# checkout an orphan branch
alias gcoo='git checkout --orphan'
# checkout development branch
alias gcod='git checkout dev'
# checkout feature branch
alias gcof='git checkout f'
# pick a commit
alias gcp='git cherry-pick'
# abort the commit pick
alias gcpa='git cherry-pick --abort'
# continue the commit pick
alias gcpc='git cherry-pick --continue'
# configure the user name
alias gcun='git config user.name'
# configure the user email
alias gcue='git config user.email'
# differences from last or between commits
alias gd='git diff'
# display what is indexed in cache
alias gdc='git diff --cached'
# indexed character-level differences
alias gdcw='git diff --cached --word-diff-regex=.'
# differences via external tool
alias gdt='git difftool --dir-diff'
# character-level differences
alias gdw='git diff --word-diff-regex=.'
# fetch from the remote repository
alias gf='git fetch --tags --verbose'
# fetch from remote repository and prune local orphan branches
alias gfp='git fetch --prune --tags --verbose'
# garbage collect all orphan commits
alias ggc='git reflog expire --expire=now --all;git gc --prune=now'
# initialize a new repository
alias gi='git init'
# initialize a new bare repository
alias gib='git init --bare'
# log commits history
alias gl='git log --all --graph \
--format="%C(auto)%h%d %C(red)%ai%C(auto) %an%n%B"'
# log commits history with patches
alias glp='git log --all --graph \
--format="%C(auto)%h%d %C(red)%ai%C(auto) %an%n%B" --patch'
# log medium information
alias glm='git log --all --decorate --graph --pretty=medium'
# fast-forward to remote branch
alias gmf='git merge --ff-only'
# do a merge commit
alias gmc='git merge --no-ff -m'
# abort the current merge commit
alias gma='git merge --abort'
# squash a branch and index its modifications
alias gms='git merge --squash'
# merge via external tool
alias gmt='git mergetool'
# push to the remote repository
alias gp='git push --tags --verbose'
# delete from the remote repository
alias gpd='git push --delete --verbose'
# force the push to the remote repository
alias gpf='git push --tags --verbose --force'
# rebase current branch onto another
alias grb='git rebase'
# abort current rebase
alias grba='git rebase --abort'
# continue current rebase
alias grbc='git rebase --continue'
# force rebase without fast-forward
alias grbf='git rebase --no-ff'
# rebase interactively
alias grbi='git rebase --interactive'
# list all remote repositories
alias grm='git remote'
# add a new remote repository
alias grma='git remote add'
# list remote repositories
alias grml='git remote --verbose'
# show a connection to a repository
alias grms='git remote show'
# set the location of the remote repository
alias grmu='git remote set-url'
# remove file(s) from index or move current branch pointer
alias grs='git reset'
# move current branch pointer to the development branch
alias grsd='git reset dev'
# wipe modifications or reset current branch to another commit
alias grsh='git reset --hard'
# reset current branch to the development branch
alias grshd='git reset --hard dev'
# current state of repository
alias gs='git status --untracked-files=all'
# show a commit
alias gsh='git show'
# tag a commit
alias gt='git tag'
# delete a tag
alias gtd='git tag --delete'
# tag a commit and sign
alias gts='git tag --sign'

2
bash/alias/grep.sh Normal file
View file

@ -0,0 +1,2 @@
# grep from current directory with regex
alias g='grep --directories recurse --line-number --regexp'

5
bash/alias/kill.sh Normal file
View file

@ -0,0 +1,5 @@
# kill a process by id
alias k='kill'
# force kill a process by id
alias kf='kill -9'

5
bash/alias/killall.sh Normal file
View file

@ -0,0 +1,5 @@
# kill all instances of a process by name
alias ka='killall'
# force kill all instances of a process by name
alias kaf='killall -9'

9
bash/alias/ls.sh Normal file
View file

@ -0,0 +1,9 @@
# list current directory's entries
alias l="\
ls \
--all \
--color \
-l \
-p \
--time-style \"+%Y%m%d-%H%M%S%-:::z\" \
"

12
bash/alias/lsblk.sh Normal file
View file

@ -0,0 +1,12 @@
# list block devices
alias lb="\
lsblk \
--output \"NAME,SIZE,TYPE,FSTYPE,MOUNTPOINTS\" \
--noempty \
"
# list block devices (old)
alias lbo="\
lsblk \
--output \"NAME,SIZE,TYPE,FSTYPE,MOUNTPOINT\" \
"

1
bash/alias/micro.sh Normal file
View file

@ -0,0 +1 @@
alias e='micro'

5
bash/alias/mkdir.sh Normal file
View file

@ -0,0 +1,5 @@
# make a directory
alias md='mkdir'
# make a directory after making its parents
alias mdp='mkdir --parents'

1
bash/alias/newsboat.sh Normal file
View file

@ -0,0 +1 @@
alias nb='newsboat'

View file

@ -0,0 +1,5 @@
# display otp code
alias pd='otpclient-cli show -a'
# list otp accounts
alias pl='otpclient-cli list'

5
bash/alias/pass.sh Normal file
View file

@ -0,0 +1,5 @@
# display pass entry's content
alias p='pass'
# copy passphrase into clipboard
alias pc='pass --clip'

2
bash/alias/ps.sh Normal file
View file

@ -0,0 +1,2 @@
# look for a string in processes names
alias pg='ps -A | grep'

8
bash/alias/rsync.sh Normal file
View file

@ -0,0 +1,8 @@
# synchronize
alias rs='rsync --archive --partial --progress --verbose --no-inc-recursive'
# synchronize and delete after
alias rsda='rsync --archive --partial --progress --verbose --delete-after'
# synchronize and delete before
alias rsdb='rsync --archive --partial --progress --verbose --delete-before'

5
bash/alias/tar.sh Normal file
View file

@ -0,0 +1,5 @@
alias tc='tar --verbose --create --auto-compress --file'
alias tl='tar --verbose --list --file'
alias tx='tar --verbose --extract --file'