0a59baf4c526b95fe6137397be6b1b8b63d1daba

Author
Sagar Patil <sagar010797@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

debian: add README (#7438)

Diff

 1diff --git a/plugins/debian/README.md b/plugins/debian/README.md
 2new file mode 100644
 3index 0000000000000000000000000000000000000000..a676674dc9c2b9c429c05c07e555474f88555ef9
 4--- /dev/null
 5+++ b/plugins/debian/README.md
 6@@ -0,0 +1,75 @@
 7+# debian
 8+
 9+This plugin provides debian related zsh aliases.
10+To use it add `debian` to the plugins array in your zshrc file.
11+
12+```zsh
13+plugins=(... debian)
14+```
15+
16+## Common Aliases
17+
18+| Alias    | Command                                                                       | Description                                                                |
19+| -------- | ------------------------------------------------------------------------------|--------------------------------------------------------------------------- |
20+| `age`    | apt-get                                                                       | Command line tool for handling packages                                    |
21+| `api`    | aptitude                                                                      | Same functionality as `apt-get`, provides extra options while installation |
22+| `acs`    | apt-cache search                                                              | Command line tool for searching apt software package cache                 |
23+| `aps`    | aptitude search                                                               | Searches installed packages using aptitude                                 |
24+| `as`     | aptitude -F \"* %p -> %d \n(%v/%V)\" \ -no-gui --disable-columns search       | -                                                                          |
25+| `afs`    | apt-file search --regexp                                                      | Search file in packages                                                    |
26+| `asrc`   | apt-get source                                                                | Fetch source packages through `apt-get`                                    |
27+| `app`    | apt-cache policy                                                              | Displays priority of package sources                                       |
28+
29+## Superuser Operations Aliases
30+
31+| Alias    | Command                                                                                          | Description                                                                                 |
32+| -------- | -------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------- |
33+| `aac`    | sudo $apt_pref autoclean                                                                         | Clears out the local repository of retrieved package files                                  |
34+| `abd`    | sudo $apt_pref build-dep                                                                         | Installs all dependencies for building packages                                             |
35+| `ac`     | sudo $apt_pref clean                                                                             | Clears out the local repository of retrieved package files except lock files                |
36+| `ad`     | sudo $apt_pref update                                                                            | Updates the package lists for upgrades for packages                                         | 
37+| `adg`    | sudo $apt_pref update && sudo $apt_pref $apt_upgr                                                | Update and upgrade packages                                                                 |
38+| `adu`    | sudo $apt_pref update && sudo $apt_pref dist-upgrade                                             | Smart upgrade that handles dependencies                                                     |
39+| `afu`    | sudo apt-file update                                                                             | Update the files in packages                                                                |
40+| `au`     | sudo $apt_pref $apt_upgr                                                                         | -                                                                                           |
41+| `ai`     | sudo $apt_pref install                                                                           | Command-line tool to install package                                                        |
42+| `ail`    | sed -e 's/  */ /g' -e 's/ *//' &#124; cut -s -d ' ' -f 1 &#124; "' xargs sudo $apt_pref install  | Install all packages given on the command line while using only the first word of each line |
43+| `ap`     | sudo $apt_pref purge                                                                             | Removes packages along with configuration files                                             |
44+| `ar`     | sudo $apt_pref remove                                                                            | Removes packages, keeps the configuration files                                             |
45+| `ads`    | sudo apt-get dselect-upgrade                                                                     | Installs packages from list and removes all not in the list                                 |
46+| `dia`    | sudo dpkg -i ./*.deb                                                                             | Install all .deb files in the current directory                                             |
47+| `di`     | sudo dpkg -i                                                                                     | Install all .deb files in the current directory                                             |
48+| `kclean` | sudo aptitude remove -P ?and(~i~nlinux-(ima&#124;hea) ?not(~n`uname -r`))                        | Remove ALL kernel images and headers EXCEPT the one in use                                  |
49+
50+- `$apt_pref` - Use apt or aptitude if installed, fallback is apt-get.
51+- `$apt_upgr` - Use upgrade.
52+
53+## Aliases - Commands using `su`
54+
55+| Alias    | Command                                                                       |
56+| -------- | ------------------------------------------------------------------------------|
57+| `aac`    | su -ls \'$apt_pref autoclean\' root                                           |
58+| `ac`     | su -ls \'$apt_pref clean\' root                                               |
59+| `ad`     | su -lc \'$apt_pref update\' root                                              |
60+| `adg`    | su -lc \'$apt_pref update && aptitude $apt_upgr\' root                        |
61+| `adu`    | su -lc \'$apt_pref update && aptitude dist-upgrade\' root                     |
62+| `afu`    | su -lc "apt-file update                                                       |
63+| `ag`     | su -lc \'$apt_pref $apt_upgr\' root                                           |
64+| `dia`    | su -lc "dpkg -i ./*.deb" root                                                 |
65+
66+## Miscellaneous Aliases
67+
68+| Alias    | Command                                          | Description                             |
69+| -------- | -------------------------------------------------|---------------------------------------- |
70+| `allpkgs`| aptitude search -F "%p" --disable-columns ~i     | Display all installed packages          |  
71+| `mydeb`  | time dpkg-buildpackage -rfakeroot -us -uc        | Create a basic .deb package             |
72+
73+## Functions
74+
75+| Fucntion              | Description                                                                   |
76+|-----------------------|-------------------------------------------------------------------------------|
77+| `apt-copy`            | Create a simple script that can be used to 'duplicate' a system               |
78+| `apt-history`         | Displays apt history for a command                                            | 
79+| `kerndeb`             | Builds kernel packages                                                        |
80+| `apt-list-packages`   | List packages by size                                                         |
81+