https://github.com/asim-tahir/docker.fish
Docker abbreviations plugin for Fish shell
https://github.com/asim-tahir/docker.fish
abbr abbreviation abbreviations docker docker-fish fish-plugin fish-shell fisher fisher-plugin oh-my-fish oh-my-fish-plugin ohmyfish ohmyfish-plugin
Last synced: 3 months ago
JSON representation
Docker abbreviations plugin for Fish shell
- Host: GitHub
- URL: https://github.com/asim-tahir/docker.fish
- Owner: Asim-Tahir
- License: mit
- Created: 2024-01-13T16:46:14.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-13T17:56:31.000Z (over 1 year ago)
- Last Synced: 2025-01-08T02:36:27.325Z (4 months ago)
- Topics: abbr, abbreviation, abbreviations, docker, docker-fish, fish-plugin, fish-shell, fisher, fisher-plugin, oh-my-fish, oh-my-fish-plugin, ohmyfish, ohmyfish-plugin
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
### `docker.fish`
> `Docker` plugin for [Oh My Fish][omf] and [Fisher][fisher],
> based loosely on the [Oh My Zsh][omz]'s [Docker Plugin][omz-docker-plugin][](/LICENSE)
[](https://fishshell.com)
[](https://www.github.com/oh-my-fish/oh-my-fish)
## Install
[Oh My Fish][omf]:
```sh
omf install https://github.com/Asim-Tahir/docker.fish
```[Fisher][fisher]:
```sh
fisher install Asim-Tahir/docker.fish
```## Abbreviations Usage
After installing the [`docker.fish`][repo] plugin, can inspect the abbreviations with the following command:
```sh
abbr --show | grep dstopa
```### Image
| Abbreviation | Command |
| ------------ | ---------------------------- |
| `dib` | `docker image build` |
| `dii` | `docker image inspect` |
| `dils` | `docker image ls` |
| `dis` | `docker images` |
| `dipu` | `docker image push` |
| `dirm` | `docker image rm` |
| `ddrmi` | remove all unused images[^1] |
| `dit` | `docker image tag` |### Container
| Abbreviation | Command |
| ------------ | --------------------------- |
| `dcin` | `docker container inspect` |
| `dcls` | `docker container ls` |
| `dclsa` | `docker container ls -a` |
| `dps` | `docker ps` |
| `dpsa` | `docker ps -a` |
| `dlo` | `docker container logs` |
| `dpo` | `docker container port` |
| `dr` | `docker container run` |
| `drit` | `docker container run -it` |
| `drm` | `docker container rm` |
| `drm!` | `docker container rm -f` |
| `dst` | `docker container start` |
| `drs` | `docker container restart` |
| `dstp` | `docker container stop` |
| `dxc` | `docker container exec` |
| `dxcit` | `docker container exec -it` |### Network
| Abbreviation | Command |
| ------------ | --------------------------- |
| `dnc` | `docker network create` |
| `dncn` | `docker network connect` |
| `dndcn` | `docker network disconnect` |
| `dni` | `docker network inspect` |
| `dnls` | `docker network ls` |
| `dnrm` | `docker network rm` |### Volume
| Abbreviation | Command |
| ------------ | ----------------------- |
| `dvi` | `docker volume inspect` |
| `dvls` | `docker volume ls` |
| `dvprune` | `docker volume prune` |### Everything Else
| Abbreviation | Command |
| ------------ | ------------------------------- |
| `dpl`[^2] | `docker pull` |
| `dbl` | `docker build` |
| `dstopa`[^3] | stop all running containers[^4] |
| `dtop` | `docker top` |# Credit
Base structure heavily inspired from [`jhillyerd/plugin-git`](https://github.com/jhillyerd/plugin-git). Thanks for the amazing plugin.
# License
[MIT][license] © [Asim Tahir][author]
[author]: https://github.com/Asim-Tahir
[repo]: https://github.com/Asim-Tahir/docker.fish
[license]: https://opensource.org/licenses/MIT
[omz]: https://github.com/ohmyzsh/ohmyzsh
[omz-docker-plugin]: https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/docker/
[omf]: https://github.com/oh-my-fish/oh-my-fish
[fisher]: https://github.com/jorgebucaran/fisher
[license-badge]: https://img.shields.io/badge/license-MIT-007EC7.svg?style=flat-square[^1]: `docker rmi (docker images --filter "dangling=true" -q --no-trunc)` command removes all dangling images, which are untagged images that are not referenced by any container.
[^2]: The original abbreviation in [`Oh My Zsh`][omz]'s [Docker plugin][omz-docker-plugin] for the `docker pull` command is [`dpu`](https://github.com/ohmyzsh/ohmyzsh/blob/7d5e12500a2ba0b575ffafcbb516568973528730/plugins/docker/docker.plugin.zsh#L19) but renamed as `dpl` is more meaningful.
[^3]: The original abbreviation in [`Oh My Zsh`][omz]'s [Docker plugin][omz-docker-plugin] for the `docker stop (docker ps -q)` command is [`dsta`](https://github.com/ohmyzsh/ohmyzsh/blob/7d5e12500a2ba0b575ffafcbb516568973528730/plugins/docker/docker.plugin.zsh#L26C7-L26C11) but renamed as `dstopa` is more meaningful.
[^4]: `docker stop (docker ps -q)` command stops all running containers.