Compare commits
2 Commits
154209ffd7
...
74b725ff89
Author | SHA1 | Date | |
---|---|---|---|
74b725ff89 | |||
f7baa29734 |
@ -1,4 +1,14 @@
|
|||||||
|
# Search for docker-compose files in the current and all sub direcotries and run docker compose with provided arguments
|
||||||
|
|
||||||
function dc() {
|
function dc() {
|
||||||
DOCKER_PARAMS="$@"
|
# Save current working directory
|
||||||
find . -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml' -execdir "docker compose ${DOCKER_PARAMS}" \;
|
CURRENT_DIR="${PWD}"
|
||||||
|
|
||||||
|
for file in $(find ${PWD} -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml'); do
|
||||||
|
cd $(dirname "$file")
|
||||||
|
docker compose $@
|
||||||
|
done
|
||||||
|
|
||||||
|
# Change back to saved working directory
|
||||||
|
cd ${CURRENT_DIR}
|
||||||
}
|
}
|
@ -3,7 +3,7 @@
|
|||||||
function zwcautocompile () {
|
function zwcautocompile () {
|
||||||
autoload -Uz zrecompile
|
autoload -Uz zrecompile
|
||||||
|
|
||||||
for zsh_file in $(find ${ZDOTDIR} -type f -maxdepth 3 \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
|
for zsh_file in $(find ${ZDOTDIR} -maxdepth 3 -type f \( -name "*.zsh" -o -name ".zlogin" -o -name ".zshrc" \) ! -name "*.zwc" ! -name "*.zwc.old"); do
|
||||||
zrecompile -pq $zsh_file && rm -f $zsh_file.zwc.old
|
zrecompile -pq $zsh_file && rm -f $zsh_file.zwc.old
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user