my xfce4 dotfiles
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
7.6 KiB

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