-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat (docker): add docker aliases #1147
Feat (docker): add docker aliases #1147
Conversation
Can I suggest a few more?
|
This PR is absolutely essential, @sorin-ionescu !!! |
See also #863 and https://github.com/felixr/docker-zsh-completion (which has instructions for installing into prezto) |
May I also suggest
|
🙏 Thanks @malikoth ! I added your proposals. I've renamed the proposed cleanup aliases to avoid conflicts with docker-compose ( |
🙏 Thanks @saoula ! I added your proposal. |
What about |
@malikoth it's already there in my standalone repository. Prezto seems in standby and @sorin-ionescu is not reactive, so I switched to zplug. You can check my up to date docker aliases here: https://github.com/akarzim/zsh-docker-aliases |
Thanks for the information that you've switched to zplug. After looking at their README, it looks like I'm switching to zplug too! (May take me awhile though. /sigh) |
Hey guys this repo is not being maintained, see #1239 The community fork is here https://github.com/zsh-users/prezto, please move this issue to zsh-users and we will be able to help you! zsh-users is an organization dedicated to host Zsh community projects and therefore became the rational home for a community maintained version of prezto. |
It looks like something happened with this PR and it may have been rebased against zsh-users/prezto... so there's quite a few unrelated information in here. If you'd like this to be merged in, it would first have to be written against this repo rather than the fork. |
775cfac
to
e3fedfd
Compare
@Belack Done. |
I appreciate your willingness to fix this, but I think you may have misunderstood... somehow there are commits from the zsh-users/prezto repo showing up in this pull request... if you look at the commits, it says there are over 100 (along with a ton of unrelated changes and conflicts). This shouldn't be based off the zsh-users repo, just this one. |
My bad. Something went wrong. It seems to be OK right now. |
modules/docker/init.zsh
Outdated
|
||
# Return if requirements are not found. | ||
if (( ! $+commands[docker] )); then | ||
return 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use two-space tabs to match with the rest of the project.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right. Done.
modules/docker/init.zsh
Outdated
if [[ -L default ]]; then | ||
eval $(rm -f default) | ||
elif [[ -d default ]]; then | ||
echo "A default manchine already exists. Abort." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo. Should be machine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
modules/docker/init.zsh
Outdated
} | ||
|
||
# | ||
# Aliases |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a ton of aliases here. Could you do something similar to what the git module does? Aliases go in alias.zsh and init.zsh calls source "${0:h}/alias.zsh"
to load it.
Also (and I realize this is a much larger task than the small ones given in the review) would it be worthwhile reorganizing the aliases and perhaps changing them to be similar in style to the git aliases? In the git module, it focuses around a single letter (g) followed by an action/object (as an example c is commit) followed by what's actually being done. So Git is also aliased to just g. Is there any reason Docker couldn't be aliased to just d rather than dk? Are there conflicts with existing commands? If not, I feel like at this point docker may be important enough to warrant a single letter. When a module gets this many aliases, it can be worthwhile to think carefully about what's worth including and what isn't, so we can avoid some of the alias hell that has been discussed in many oh-my-zsh issues. I'd personally like to see similar aliases for docker. As an example, Does anyone else have opinions on this? I realize this may be a bit more than most people wanted to read, but I'd be happy to hear what everyone else thinks as well. EDIT: And please don't take this as what needs to be done. I'd just like to get a discussion started. There may be more value in keeping the aliases closely matched to their original full commands as well. |
@belak in fact, I tried to match git aliases pattern: I choosed |
Alright, I'm going to merge this to a temporary branch, squash the commits, and undo the submodule changes before merging it into master, but it looks pretty much ready. |
Great ! Thank you Kaleb. |
Merged in 8a43331. Thanks for all your work on this! |
* upstream/master: (57 commits) Move python-info call in paradox from preexec to precmd Add missing alias to utility README Rework diff function Remove additional newlines in issue and pull request templates Add initial issue and pull request templates Add note to CONTRIBUTING.md about zstyle Add code style to CONTRIBUTING.md Update is-callable to also check builtins Fix indentation in README Feat (docker): add docker aliases (sorin-ionescu#1147) Doc (ruby): add doc on bundle clean alias Add bundle clean alias Don't use a deprecated argument as a python example Add note about working around preexisting runcoms completion: Cap max-errors at 7 to avoid hanging (sorin-ionescu#953) Allow syntax highlighting pattern styles (sorin-ionescu#1192) Feat (aliases): add aliases for git flow Update fasd README with basic installation information Remove manb from completion filename Ensure extendedglob is set in promptpwd ...
* upstream/master: (57 commits) Update ssh module for multi session hosts New `alias gfa=git fetch --all` for git module Add utility alias for pydf Add perl-info function & plenv subcommand aliases (sorin-ionescu#1303) archive: add archive function archive: add support for *.jar files (sorin-ionescu#1302) Move python-info call in paradox from preexec to precmd Add missing alias to utility README Rework diff function Remove additional newlines in issue and pull request templates Add initial issue and pull request templates Add note to CONTRIBUTING.md about zstyle Add code style to CONTRIBUTING.md Update is-callable to also check builtins Fix indentation in README Feat (docker): add docker aliases (sorin-ionescu#1147) Doc (ruby): add doc on bundle clean alias Add bundle clean alias Don't use a deprecated argument as a python example Add note about working around preexisting runcoms ...
* 'master' of github.com:nosyjoe/prezto: (55 commits) uses nosyjoe theme instead of philipp after renaming disables fvm in favor of rbenv updates some modules fixes doubled username/host prompt on ssh sessions Move python-info call in paradox from preexec to precmd Add missing alias to utility README Rework diff function Remove additional newlines in issue and pull request templates Add initial issue and pull request templates Add note to CONTRIBUTING.md about zstyle Add code style to CONTRIBUTING.md Update is-callable to also check builtins Fix indentation in README Feat (docker): add docker aliases (sorin-ionescu#1147) Doc (ruby): add doc on bundle clean alias Add bundle clean alias Don't use a deprecated argument as a python example Add note about working around preexisting runcoms completion: Cap max-errors at 7 to avoid hanging (sorin-ionescu#953) Allow syntax highlighting pattern styles (sorin-ionescu#1192) ...
Add some concise aliases for docker, docker-machine and docker-compose.
AFAIK, theses aliases will not shadow other system commands or presto’s module aliases.