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() {
|
||||
DOCKER_PARAMS="$@"
|
||||
find . -maxdepth 2 -type f -regextype posix-extended -regex '.*(docker-compose|compose)\.ya?ml' -execdir "docker compose ${DOCKER_PARAMS}" \;
|
||||
# Save current working directory
|
||||
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 () {
|
||||
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
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user