1
0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2026-01-19 00:37:35 +08:00

Compare commits

...

12 Commits

Author SHA1 Message Date
Marc Cornellà
2c0315dba4 ng: refactor README 2020-02-27 19:26:55 +01:00
Guillermo del Fresno
79fff1ee49
macports: add rdeps and rdependents completion (#4717) 2020-02-27 18:55:14 +01:00
Miguel Vaello Martínez
ee7a9f6fe6 jhbuild: add some missing commands and update README (#5195)
Commands: make, tinderbox.

Closes #5195

Co-authored-by: Marc Cornellà <marc.cornella@live.com>
2020-02-27 18:51:44 +01:00
Adrien Plazas
573901dd46
jhbuild: add shell alias (#3707)
This adds "jhsh" as an alias for "jhbuild shell" to the JHBuild plugin.
2020-02-27 18:45:53 +01:00
Julian Parsert
dbd2f77bd9
norm: add hg prompt (#6725) 2020-02-27 18:28:08 +01:00
Ciacho
011c7153d5 nmap: add alias for ICMP scan (#4807)
Closes #4807
2020-02-27 18:25:39 +01:00
Petr Bělohlávek
6b54302b90 python: add alias to run the proper IPython based on virtualenv
Current state: a user invokes `ipython` and is provided with the IPython
instance regarding the `$PATH`.

Proposed state: a user invokes `ipython` (which is a new alias in the
*python plugin*) and is provided with the proper IPython instance regarding
the currently activated virtualenv.

Example: the user's default Python is 2.7 with installed IPython 2.7. User
activates Python 3.5 virtualenv where he installs IPython 3.5. After
activating the environment, one expects `ipython` to run the version 3.5,
which does not happen by default. Instead, IPython 2.7 is used, which in
counter-intuitive and often causes problem.

Closes #5797
2020-02-27 17:17:01 +01:00
Mauricio Wolff
bccfe1389c
updater: add --autostash to git pull (#7172)
If I have custom configs (like theme customizations) I have to stash my changes and get them back after the update. 

By adding the --autostash on upgrade.sh, if I have any changes not commited they'll be reapplied after the upgrade, allowing me to have temporary customizations without any harm to the upgrade process.
2020-02-27 17:06:20 +01:00
Marc Cornellà
6cb8ff391d vagrant: document aliases 2020-02-27 15:21:10 +01:00
Marc Cornellà
3c61bac9a1
vagrant: add common aliases (#3762) 2020-02-27 15:20:19 +01:00
Robert McLeod
b6ed2e7ac3 added aliases for ssh-config and global-status
So the following aliases call the respective commands:
vgs = vagrant global-status
vsshc = vagrant ssh-config
2015-07-08 07:54:42 +12:00
Robert McLeod
c840594c6f added aliases for vagrant 2015-04-10 15:07:29 +12:00
12 changed files with 143 additions and 75 deletions

View File

@ -1,4 +1,34 @@
## JHBuild
# JHBuild
This plugin adds some [JHBuild](https://developer.gnome.org/jhbuild/) aliases.
To use it, add `jhbuild` to the plugins array of your zshrc file:
```zsh
plugins=(... jhbuild)
```
**Maintainer:** [Miguel Vaello](https://github.com/miguxbe)
This plugin adds some jhbuild aliases and increase the completion function provided by zsh.
## Aliases
| Alias | Command |
|---------|---------------------------|
| `jh` | `jhbuild` |
| `jhb` | `jhbuild build` |
| `jhbo` | `jhbuild buildone` |
| `jhckb` | `jhbuild checkbranches` |
| `jhckm` | `jhbuild checkmodulesets` |
| `jhi` | `jhbuild info` |
| `jhl` | `jhbuild list` |
| `jhc` | `jhbuild clean` |
| `jhco` | `jhbuild cleanone` |
| `jhm` | `jhbuild make` |
| `jhr` | `jhbuild run` |
| `jhrd` | `jhbuild rdepends` |
| `jhsd` | `jhbuild sysdeps` |
| `jhu` | `jhbuild update` |
| `jhuo` | `jhbuild updateone` |
| `jhun` | `jhbuild uninstall` |
| `jhsh` | `jhbuild shell` |
| `jht` | `jhbuild tinderbox` |

View File

@ -1,5 +1,6 @@
# Aliases
#
# JHBuild Aliases
# Base
alias jh='jhbuild'
# Build
alias jhb='jhbuild build'
@ -7,12 +8,14 @@ alias jhbo='jhbuild buildone'
# Checks
alias jhckb='jhbuild checkbranches'
alias jhckm='jhbuild checkmodulesets'
# Info & list
# Info & List
alias jhi='jhbuild info'
alias jhl='jhbuild list'
# Clean
alias jhc='jhbuild clean'
alias jhco='jhbuild cleanone'
# Make
alias jhm='jhbuild make'
# Run
alias jhr='jhbuild run'
# Depends
@ -23,6 +26,7 @@ alias jhu='jhbuild update'
alias jhuo='jhbuild updateone'
# Uninstall
alias jhun='jhbuild uninstall'
# Shell
alias jhsh='jhbuild shell'
# Tinderbox
alias jht='jhbuild tinderbox'

View File

@ -41,6 +41,8 @@ subcmds=(
'patch'
'pkg'
'provides'
'rdependents'
'rdeps'
'rpmpackage'
'search'
'selfupdate'

View File

@ -1,37 +1,10 @@
## NG Plugin
# ng plugin
This [ng plugin](https://github.com/ohmyzsh/ohmyzsh/tree/master/plugins/ng)
adds completion support for Angular's CLI (named ng).
This plugin adds autocompletion support for [Angular's CLI](https://github.com/angular/angular-cli)
(named `ng`).
Ng is hosted on [ng home](https://github.com/catull/angular-cli)
It is used to generate Angular 2 app "stubs", build those apps, configure them,
test them, lint them etc.
Ahem, "stubs" is not what Angular engineers refer to the items ng can generate
for you.
"Stubs" can be any one of:
- class
- component
- directive
- enum
- module
- pipe
- route
- service
At the moment, `ng completion` creates a very rough completion for Zsh and
Bash.
It is missing most of the options and a few arguments.
In future, this plugin may be shortened to simply being
To use it, add `ng` to the plugins array of your zshrc file:
```zsh
eval `ng completion`
plugins=(... ng)
```
There is hope this materialises in the 21st century.
### CONTRIBUTOR
- Carlo Dapor ([catull](https://github.com/catull))

View File

@ -1,37 +1,27 @@
# Nmap aliases plugin
# Nmap plugin
Adds some useful aliases for nmap similar to the profiles in zenmap.
Adds some useful aliases for [Nmap](https://nmap.org/) similar to the profiles in zenmap.
Nmap options are:
* -sS - TCP SYN scan
* -v - verbose
* -T1 - timing of scan. Options are paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5)
* -sF - FIN scan (can sneak through non-stateful firewalls)
* -PE - ICMP echo discovery probe
* -PP - timestamp discovery probe
* -PY - SCTP init ping
* -g - use given number as source port
* -A - enable OS detection, version detection, script scanning, and traceroute (aggressive)
* -O - enable OS detection
* -sA - TCP ACK scan
* -F - fast scan
* --script=vulscan - also access vulnerabilities in target
To use it, add `nmap` to the plugins array in your zshrc file:
## Aliases explained
```zsh
plugins=(... nmap)
```
* nmap_open_ports - Scan for open ports on target
* nmap_list_interfaces - List all network interfaces on host where the command runs
* nmap_slow - Slow scan that avoids to spam the targets logs
* nmap_fin - Scan to see if hosts are up with TCP FIN scan
* nmap_full - Aggressive full scan that scans all ports, tries to determine OS and service versions
* nmap_check_for_firewall - TCP ACK scan to check for firewall existence
* nmap_ping_through_firewall - Host discovery with SYN and ACK probes instead of just pings to avoid firewall
restrictions
* nmap_fast - Fast scan of the top 300 popular ports
* nmap_detect_versions - Detects versions of services and OS, runs on all ports
* nmap_check_for_vulns - Uses vulscan script to check target services for vulnerabilities
* nmap_full_udp - Same as full but via UDP
* nmap_traceroute - Try to traceroute using the most common ports
* nmap_full_with_scripts - Same as nmap_full but also runs all the scripts
* nmap_web_safe_osscan - Little "safer" scan for OS version as connecting to only HTTP and HTTPS ports doesn't look so attacking.
## Aliases
- `nmap_open_ports`: scan for open ports on target.
- `nmap_list_interfaces`: list all network interfaces on host where the command runs.
- `nmap_slow`: slow scan that avoids to spam the targets logs.
- `nmap_fin`: scan to see if hosts are up with TCP FIN scan.
- `nmap_full`: aggressive full scan that scans all ports, tries to determine OS and service versions.
- `nmap_check_for_firewall`: TCP ACK scan to check for firewall existence.
- `nmap_ping_through_firewall`: host discovery with SYN and ACK probes instead of just pings to avoid firewall restrictions.
- `nmap_fast`: fast scan of the top 300 popular ports.
- `nmap_detect_versions`: detects versions of services and OS, runs on all ports.
- `nmap_check_for_vulns`: uses vulscan script to check target services for vulnerabilities.
- `nmap_full_udp`: same as full but via UDP.
- `nmap_traceroute`: try to traceroute using the most common ports.
- `nmap_full_with_scripts`: same as nmap_full but also runs all the scripts.
- `nmap_web_safe_osscan`: little "safer" scan for OS version as connecting to only HTTP and HTTPS ports doesn't look so attacking.
- `nmap_ping_scan`: ICMP scan for active hosts.

View File

@ -29,4 +29,4 @@ alias nmap_full_udp="sudo nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443
alias nmap_traceroute="sudo nmap -sP -PE -PS22,25,80 -PA21,23,80,3389 -PU -PO --traceroute "
alias nmap_full_with_scripts="sudo nmap -sS -sU -T4 -A -v -PE -PP -PS21,22,23,25,80,113,31339 -PA80,113,443,10042 -PO --script all "
alias nmap_web_safe_osscan="sudo nmap -p 80,443 -O -v --osscan-guess --fuzzy "
alias nmap_ping_scan="nmap -n -sP"

View File

@ -14,3 +14,4 @@ plugins=(... python)
| `pyfind` | Finds .py files recursively in the current directory |
| `pyclean [dirs]` | Deletes byte-code and cache files from a list of directories or the current one |
| `pygrep <text>` | Looks for `text` in .py files |
| `ipython` | Runs the appropriate `ipython` version according to the activated virtualenv |

View File

@ -14,3 +14,5 @@ function pyclean() {
# Grep among .py files
alias pygrep='grep -r --include="*.py"'
# Run proper IPython regarding current virtualenv (if any)
alias ipython="python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'"

View File

@ -8,3 +8,33 @@ To use it, add `vagrant` to the plugins array in your zshrc file:
plugins=(... vagrant)
```
## Aliases
| Alias | Command |
|---------|------------------------------|
| `vgi` | `vagrant init` |
| `vup` | `vagrant up` |
| `vd` | `vagrant destroy` |
| `vdf` | `vagrant destroy -f` |
| `vssh` | `vagrant ssh` |
| `vsshc` | `vagrant ssh-config` |
| `vrdp` | `vagrant rdp` |
| `vh` | `vagrant halt` |
| `vssp` | `vagrant suspend` |
| `vst` | `vagrant status` |
| `vre` | `vagrant resume` |
| `vgs` | `vagrant global-status` |
| `vpr` | `vagrant provision` |
| `vr` | `vagrant reload` |
| `vrp` | `vagrant reload --provision` |
| `vp` | `vagrant push` |
| `vsh` | `vagrant share` |
| `vba` | `vagrant box add` |
| `vbr` | `vagrant box remove` |
| `vbl` | `vagrant box list` |
| `vbo` | `vagrant box outdated` |
| `vbu` | `vagrant box update` |
| `vpli` | `vagrant plugin install` |
| `vpll` | `vagrant plugin list` |
| `vplun` | `vagrant plugin uninstall` |
| `vplu` | `vagrant plugin update` |

View File

@ -0,0 +1,33 @@
alias vgi="vagrant init"
alias vup="vagrant up"
alias vd="vagrant destroy"
alias vdf="vagrant destroy -f"
alias vssh="vagrant ssh"
alias vsshc="vagrant ssh-config"
alias vrdp="vagrant rdp"
alias vh="vagrant halt"
alias vssp="vagrant suspend"
alias vst="vagrant status"
alias vre="vagrant resume"
alias vgs="vagrant global-status"
alias vpr="vagrant provision"
alias vr="vagrant reload"
alias vrp="vagrant reload --provision"
alias vp="vagrant push"
alias vsh="vagrant share"
alias vba="vagrant box add"
alias vbr="vagrant box remove"
alias vbl="vagrant box list"
alias vbo="vagrant box outdated"
alias vbu="vagrant box update"
alias vpli="vagrant plugin install"
alias vpll="vagrant plugin list"
alias vplun="vagrant plugin uninstall"
alias vplu="vagrant plugin update"

View File

@ -1,4 +1,7 @@
PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)%{$reset_color%}'
PROMPT='%{$fg[yellow]%}λ %m %{$fg[green]%}%c %{$fg[yellow]%}→ $(git_prompt_info)$(hg_prompt_info)%{$reset_color%}'
ZSH_THEME_GIT_PROMPT_PREFIX="λ %{$fg[blue]%}git %{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"
ZSH_THEME_HG_PROMPT_PREFIX="λ %{$fg[blue]%}hg %{$fg[red]%}"
ZSH_THEME_HG_PROMPT_SUFFIX="%{$fg[yellow]%} → %{$reset_color%}"

View File

@ -38,7 +38,7 @@ if [ -n "$remote" ]; then
fi
printf "${BLUE}%s${NORMAL}\n" "Updating Oh My Zsh"
if git pull --rebase --stat origin master
if git pull --rebase --autostash --stat origin master
then
printf '%s' "$GREEN"
printf '%s\n' ' __ __ '