mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-01 04:30:37 +02:00
update README and add more commands
Signed-off-by: Victor Gonzalez <victor.gonzalezro@gmail.com>
This commit is contained in:
parent
249964ec04
commit
014b9d50d4
2 changed files with 90 additions and 22 deletions
|
|
@ -1,21 +1,83 @@
|
||||||
This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detection that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default.
|
This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detection that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default.
|
||||||
|
|
||||||
acs = Apt-Cache Search
|
# Apt-Get Aliases
|
||||||
acp = Apt-Cache Policy
|
|
||||||
|
|
||||||
ag = sudo Apt-Get
|
## Single Command Aliases
|
||||||
agi = sudo Apt-Get Install
|
|
||||||
agd = sudo Apt-Get Dselect-upgrade
|
|
||||||
By now you already can guess almost all aliases
|
|
||||||
|
|
||||||
There are two exeptions since ...
|
| Alias | Command |
|
||||||
agu = sudo Apt-Get Update - we have ...
|
| :----- | :------------------------------- |
|
||||||
agug = sudo Apt-Get UpGrade - as the exceptional 4 letter alias for a single command.
|
| `acps` | `apt-cache policy` |
|
||||||
|
| `acs` | `apt-cache search` |
|
||||||
|
| `afs` | `apt-file search --regexp` |
|
||||||
|
| `afu` | `sudo apt-file update` |
|
||||||
|
| `ag` | `sudo apt-get` |
|
||||||
|
| `aga` | `sudo apt-get autoclean` |
|
||||||
|
| `agar` | `sudo apt-get autoremove` |
|
||||||
|
| `agb` | `sudo apt-get build-dep` |
|
||||||
|
| `agc` | `sudo apt-get clean` |
|
||||||
|
| `agd` | `sudo apt-get dselect-upgrade` |
|
||||||
|
| `agdu` | `sudo apt-get dist-upgrade` |
|
||||||
|
| `agi` | `sudo apt-get install` |
|
||||||
|
| `agp` | `sudo apt-get purge` |
|
||||||
|
| `agr` | `sudo apt-get remove` |
|
||||||
|
| `agu` | `sudo apt-get update` |
|
||||||
|
| `agug` | `sudo apt-get ugrade` |
|
||||||
|
| `ags` | `apt-get source` |
|
||||||
|
| `ppap` | `sudo ppa-purge` |
|
||||||
|
|
||||||
afs = Apt-File Search --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command.
|
## Multi-Command Aliases
|
||||||
|
|
||||||
Then there are the 2 other 4 letter aliases for combined commands, that are straight forward and easy to remember.
|
| Alias | Command |
|
||||||
aguu = sudo Apt-Get Update && sudo apt-get Upgrade - better then adg or not?
|
| :------------------- | :--------------------------------------------- |
|
||||||
agud = sudo Apt-Get Update && sudo apt-get Dist-upgrade
|
| `agud` | `agu && agdu` |
|
||||||
|
| `aguu` | `agu && agu` |
|
||||||
|
| `safe-upgrade-clean` | `agu && agdu && agar && aga` |
|
||||||
|
|
||||||
For a full list aliases and the functions just watch the plugins code https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/ubuntu/ubuntu.plugin.zsh, look at the comments if you want to switch from the debian plugin. Ubuntu, Mint and & co users will like the new aar function to install packages from ppas with a single command.
|
## Special Commands
|
||||||
|
|
||||||
|
This commands are a little bit more complicated, so the actual commands will be ommited from this README. Check the actual source in the `ubuntu.plugin.zsh` file.
|
||||||
|
|
||||||
|
|
||||||
|
| Alias | Description |
|
||||||
|
| :----- | :------------------------------- |
|
||||||
|
| `kclean` | Removes ALL kernel images and headers EXCEPT the one in use. |
|
||||||
|
| `allpkgs` | Prints all installed packages in your system. |
|
||||||
|
| `mydeb` | Creates a basic `.deb` package. |
|
||||||
|
| `aar` | Adds a PPA repository and installs a package. Usage: `aar ppa:xxxxxx/xxxxxx [packagename]` |
|
||||||
|
| `apt-history` | Prints apt history. Usage: <code>apt-history install|upgrade|remove|rollback|list</code> |
|
||||||
|
| `kerndeb` | Shortcut for kernel-package building. |
|
||||||
|
| `apt-list-packages` | Lists installed packages sorted by size. |
|
||||||
|
|
||||||
|
# Spotify Control Commands
|
||||||
|
|
||||||
|
A variety of commands to control your Spotify client from the commodity of your console using dark magic*.
|
||||||
|
|
||||||
|
\* May contain `dbus` and `curl` dark magic.
|
||||||
|
|
||||||
|
## Requirements
|
||||||
|
|
||||||
|
You still need to have the Spotify client installed and open to make this commands work properly.
|
||||||
|
|
||||||
|
You can download the client from here: https://www.spotify.com/download/
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
`spotify-ctl [command]`
|
||||||
|
|
||||||
|
| Commands | Description |
|
||||||
|
| :----------- | :--------------------------------------------------------- |
|
||||||
|
| `play` | Play Spotify |
|
||||||
|
| `pause` | Pause Spotify |
|
||||||
|
| `playpause` | Toggles betwen play/pause |
|
||||||
|
| `next` | Go to next track |
|
||||||
|
| `prev` | Go to previous track |
|
||||||
|
| `current` | Displays the current track metadata |
|
||||||
|
| `metadata` | Displays the current track raw metadata |
|
||||||
|
| `eval` | Returns the current track metadata as a shell variables <code>SPOTIFY_(title|album|artist|trackid|trackNumber)</code> |
|
||||||
|
| `art` | Prints the URL to the current track's album artwork |
|
||||||
|
| `url` | Prints the URL for the current track |
|
||||||
|
| `http` | Open the current track in a web browser |
|
||||||
|
| `open <uri>` | Opens a Spotify URI in the client" |
|
||||||
|
| `search <q>` | Start playing the best search result for the given query |
|
||||||
|
| `help` | Displays the help text |
|
||||||
|
| `<q>` | `spotify-ctl foo` will search for `foo` |
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,7 @@ alias aga='sudo apt-get autoclean' # aac
|
||||||
alias agb='sudo apt-get build-dep' # abd
|
alias agb='sudo apt-get build-dep' # abd
|
||||||
alias agc='sudo apt-get clean' # adc
|
alias agc='sudo apt-get clean' # adc
|
||||||
alias agd='sudo apt-get dselect-upgrade' # ads
|
alias agd='sudo apt-get dselect-upgrade' # ads
|
||||||
|
alias agdu='sudo apt-get dist-upgrade'
|
||||||
alias agi='sudo apt-get install' # ai
|
alias agi='sudo apt-get install' # ai
|
||||||
alias agp='sudo apt-get purge' # ap
|
alias agp='sudo apt-get purge' # ap
|
||||||
alias agr='sudo apt-get remove' # ar
|
alias agr='sudo apt-get remove' # ar
|
||||||
|
|
@ -46,6 +47,7 @@ compdef _aga aga='sudo apt-get autoclean'
|
||||||
compdef _agb agb='sudo apt-get build-dep'
|
compdef _agb agb='sudo apt-get build-dep'
|
||||||
compdef _agc agc='sudo apt-get clean'
|
compdef _agc agc='sudo apt-get clean'
|
||||||
compdef _agd agd='sudo apt-get dselect-upgrade'
|
compdef _agd agd='sudo apt-get dselect-upgrade'
|
||||||
|
compdef _agdu agdu='sudo apt-get dist-upgrade'
|
||||||
compdef _agi agi='sudo apt-get install'
|
compdef _agi agi='sudo apt-get install'
|
||||||
compdef _agp agp='sudo apt-get purge'
|
compdef _agp agp='sudo apt-get purge'
|
||||||
compdef _agr agr='sudo apt-get remove'
|
compdef _agr agr='sudo apt-get remove'
|
||||||
|
|
@ -55,6 +57,10 @@ compdef _agug agug='sudo apt-get upgrade'
|
||||||
compdef _aguu aguu='sudo apt-get update && sudo apt-get upgrade'
|
compdef _aguu aguu='sudo apt-get update && sudo apt-get upgrade'
|
||||||
compdef _agar agar='sudo apt-get autoremove'
|
compdef _agar agar='sudo apt-get autoremove'
|
||||||
|
|
||||||
|
# Update/Upgrade all your packages and remove all unused packages safely
|
||||||
|
alias safe-upgrade-clean='sudo apt-get update && sudo apt-get dist-upgrade \
|
||||||
|
&& sudo apt-get autoremove && sudo apt-get autoclean'
|
||||||
|
|
||||||
# Remove ALL kernel images and headers EXCEPT the one in use
|
# Remove ALL kernel images and headers EXCEPT the one in use
|
||||||
alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \
|
alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \
|
||||||
?not(~n`uname -r`))'
|
?not(~n`uname -r`))'
|
||||||
|
|
@ -241,7 +247,7 @@ function spotify-ctl {
|
||||||
|
|
||||||
# Prints usage information.
|
# Prints usage information.
|
||||||
function sp-help {
|
function sp-help {
|
||||||
echo "Usage: soptify-ctl [command]"
|
echo "Usage: spotify-ctl [command]"
|
||||||
echo "Control a running Spotify instance from the command line."
|
echo "Control a running Spotify instance from the command line."
|
||||||
echo ""
|
echo ""
|
||||||
echo " spotify-ctl play - Play Spotify"
|
echo " spotify-ctl play - Play Spotify"
|
||||||
|
|
@ -250,15 +256,15 @@ function spotify-ctl {
|
||||||
echo " spotify-ctl next - Go to next track"
|
echo " spotify-ctl next - Go to next track"
|
||||||
echo " spotify-ctl prev - Go to previous track"
|
echo " spotify-ctl prev - Go to previous track"
|
||||||
echo ""
|
echo ""
|
||||||
echo " spotify-ctl current - Format the currently playing track"
|
echo " spotify-ctl current - Displays the current track metadata"
|
||||||
echo " spotify-ctl metadata - Dump the current track's metadata"
|
echo " spotify-ctl metadata - Displays the current track raw metadata"
|
||||||
echo " spotify-ctl eval - Return the metadata as a shell script"
|
echo " spotify-ctl eval - Returns the current track metadata as a shell variables. SPOTIFY_(title|album|artist|trackid|trackNumber)"
|
||||||
echo " spotify-ctl art - Print the URL to the current track's album artwork"
|
echo " spotify-ctl art - Prints the URL to the current track's album artwork"
|
||||||
echo ""
|
echo ""
|
||||||
echo " spotify-ctl url - Print the HTTP URL for the currently playing track"
|
echo " spotify-ctl url - Prints the URL for the currently playing track"
|
||||||
echo " spotify-ctl http - Open the HTTP URL in a web browser"
|
echo " spotify-ctl http - Open the current track in a web browser"
|
||||||
echo ""
|
echo ""
|
||||||
echo " spotify-ctl open <uri> - Open a spotify: uri"
|
echo " spotify-ctl open <uri> - Opens a Spotify URI in the client"
|
||||||
echo " spotify-ctl search <q> - Start playing the best search result for the given query"
|
echo " spotify-ctl search <q> - Start playing the best search result for the given query"
|
||||||
echo ""
|
echo ""
|
||||||
echo " spotify-ctl help - Show this information"
|
echo " spotify-ctl help - Show this information"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue