BashRC: Reworked docker shortcuts. VimRC: Added file with line opening plugin.

Signed-off-by: Hermann Mayer's avatarHermann Mayer <hermann.mayer92@gmail.com>
parent 0b771d69
fb86c0f1-3fd8-4677-aba4-a75f7eae8259
\ No newline at end of file
......@@ -60,6 +60,8 @@ if 1 == VimRCBundlesMisc
Plugin 'copypath.vim'
" Fuzzy finder (fzf) for vim
Plugin 'junegunn/fzf.vim'
" Open a file:line
Plugin 'bogado/file-line'
endif
if 1 == VimRCBundlesDevel
......
......@@ -27,3 +27,4 @@ alias mkdir='mkdir -p -v'
alias openports='netstat --all --numeric --programs --inet --inet6 | tail -n +3 | rev | sort -k 1,1 | rev'
alias less='less -R'
alias x='exit'
alias all='mpx *'
......@@ -7,26 +7,6 @@
# | Development/Docker Helper
# +-------------------------------------------------
function docker-remove-stopped-containers()
{
if [ -z "$(docker ps -a -f 'status=exited' -q)" ]; then
echo 'No stopped containers found.'
return 0
fi
docker rm --volumes --force $(docker ps -a -f 'status=exited' -q)
}
function docker-remove-untagged-images()
{
docker rmi $(docker images -a | grep "^<none>" | awk '{print $3}')
}
function docker-remove-all-images()
{
docker rmi --force $(docker images -aq)
}
function docker-memory-usage()
{
TMP_FILE=$(mktemp)
......@@ -47,11 +27,6 @@ function docker-memory-usage()
rm ${TMP_FILE}
}
function docker-stop-all()
{
docker ps -a -q | xargs -rn1 docker kill -s9
}
function __docker_prepare_user_container()
{
cat << EOF >${SCRIPT_FILE}
......@@ -177,3 +152,39 @@ function docker-distclean()
sudo bash -c 'rm -rf /var/lib/docker/*'
sudo systemctl start docker
}
function docker-clean()
{
docker ps -aq \
| xargs -rn1 docker rm -f
}
function docker-remove-stopped-containers()
{
docker ps -a -f 'status=exited' -q \
| xargs -rn1 docker rm --volumes --force
}
function docker-clean-untagged-images()
{
docker images -a | grep "^<none>" | awk '{print $3}' \
| xargs -rn1 docker rmi --force
}
function docker-clean-images()
{
docker images -aq \
| xargs -rn1 docker rmi --force
}
function docker-stop()
{
docker ps -a | grep "$@" | cut -d ' ' -f1 \
| xargs -rn1 docker rm -f
}
function docker-stop-all()
{
docker ps -aq | \
xargs -rn1 docker rm -f
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment