mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-10 04:26:17 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
25e081028a
10 changed files with 40 additions and 74 deletions
|
|
@ -22,7 +22,12 @@ alias _='sudo'
|
||||||
alias please='sudo'
|
alias please='sudo'
|
||||||
|
|
||||||
## more intelligent acking for ubuntu users
|
## more intelligent acking for ubuntu users
|
||||||
alias afind='ack-grep -il'
|
if which ack-grep > /dev/null;
|
||||||
|
then
|
||||||
|
alias afind='ack-grep -il'
|
||||||
|
else
|
||||||
|
alias afind='ack -il'
|
||||||
|
fi
|
||||||
|
|
||||||
# only define LC_CTYPE if undefined
|
# only define LC_CTYPE if undefined
|
||||||
if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
|
if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
|
||||||
|
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
## atom
|
|
||||||
|
|
||||||
This plugin makes "at" a useful function for invoking the Atom Editor.
|
|
||||||
|
|
||||||
Originally by Github user [aforty](https://github.com/aforty) for OSX, modified to alias 'at' to 'atom' for Linux, since atom already works on the terminal for Linux, and calling 'at' in a non-OSX environment should still work.
|
|
||||||
|
|
||||||
### Requirements
|
|
||||||
|
|
||||||
* [Atom](https://atom.io/)
|
|
||||||
|
|
||||||
### Usage
|
|
||||||
|
|
||||||
* If `at` command is called without an argument, launch Atom
|
|
||||||
|
|
||||||
* If `at` is passed a directory, open it in Atom
|
|
||||||
|
|
||||||
* If `at` is passed a file, open it in Atom
|
|
||||||
|
|
||||||
### Examples
|
|
||||||
|
|
||||||
* Open the current dir in atom: `at .`
|
|
||||||
* Open another dir in atom: `at path/to/folder`
|
|
||||||
* Open a file: `at filename.extension`
|
|
||||||
|
|
@ -1,37 +0,0 @@
|
||||||
case $OSTYPE in
|
|
||||||
darwin*)
|
|
||||||
local _atom_paths > /dev/null 2>&1
|
|
||||||
_atom_paths=(
|
|
||||||
"$HOME/Applications/Atom.app"
|
|
||||||
"/Applications/Atom.app"
|
|
||||||
)
|
|
||||||
|
|
||||||
for _atom_path in $_atom_paths; do
|
|
||||||
if [[ -a $_atom_path ]]; then
|
|
||||||
alias at="open -a '$_atom_path'"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
;;
|
|
||||||
cygwin)
|
|
||||||
local _atom_path > /dev/null 2>&1
|
|
||||||
|
|
||||||
_atom_path=${LOCALAPPDATA}/atom/bin/atom
|
|
||||||
|
|
||||||
if [[ -a $_atom_path ]]; then
|
|
||||||
cyg_open_atom()
|
|
||||||
{
|
|
||||||
if [[ -n $1 ]]; then
|
|
||||||
${_atom_path} `cygpath -w -a $1`
|
|
||||||
else
|
|
||||||
${_atom_path}
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
alias at=cyg_open_atom
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
linux*)
|
|
||||||
# Alerts the user if 'atom' is not a found command.
|
|
||||||
type atom >/dev/null 2>&1 && alias at="atom" || { echo >&2 "You have enabled the atom oh-my-zsh plugin on Linux, but atom is not a recognized command. Please make sure you have it installed before using this plugin."; }
|
|
||||||
esac
|
|
||||||
|
|
@ -20,6 +20,13 @@
|
||||||
# c. Or, use this file as an oh-my-zsh plugin.
|
# c. Or, use this file as an oh-my-zsh plugin.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
alias ghf='git hf'
|
||||||
|
alias ghff='git hf feature'
|
||||||
|
alias ghfr='git hf release'
|
||||||
|
alias ghfh='git hf hotfix'
|
||||||
|
alias ghfs='git hf support'
|
||||||
|
alias ghfu='git hf update'
|
||||||
|
|
||||||
_git-hf ()
|
_git-hf ()
|
||||||
{
|
{
|
||||||
local curcontext="$curcontext" state line
|
local curcontext="$curcontext" state line
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
# Grabs all available tasks from the `gulpfile.js`
|
# Grabs all available tasks from the `gulpfile.js`
|
||||||
# in the current directory.
|
# in the current directory.
|
||||||
#
|
#
|
||||||
function $$gulp_completion() {
|
function $$gulp_completion {
|
||||||
compls=$(grep -Eo "gulp.task\((['\"](([a-zA-Z0-9]|-)*)['\"],)" gulpfile.js 2>/dev/null | grep -Eo "['\"](([a-zA-Z0-9]|-)*)['\"]" | sed s/"['\"]"//g | sort)"
|
compls="$(grep -Eo "gulp.task\((['\"](([a-zA-Z0-9]|-)*)['\"],)" gulpfile.js 2>/dev/null | grep -Eo "['\"](([a-zA-Z0-9]|-)*)['\"]" | sed s/"['\"]"//g | sort)"
|
||||||
|
|
||||||
completions=(${=compls})
|
completions=(${=compls})
|
||||||
compadd -- $completions
|
compadd -- $completions
|
||||||
|
|
|
||||||
|
|
@ -19,14 +19,19 @@ Nmap options are:
|
||||||
|
|
||||||
## Aliases explained
|
## Aliases explained
|
||||||
|
|
||||||
* nmap_open_ports - scan for open ports on target
|
* nmap_open_ports - Scan for open ports on target
|
||||||
* nmap_list_interfaces - list all network interfaces on host where the command runs
|
* 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_slow - Slow scan that avoids to spam the targets logs
|
||||||
* nmap_fin - scan to see if hosts are up with TCP FIN scan
|
* 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_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_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
|
* nmap_ping_through_firewall - Host discovery with SYN and ACK probes instead of just pings to avoid firewall
|
||||||
restrictions
|
restrictions
|
||||||
* nmap_fast - Fast scan of the top 300 popular ports
|
* nmap_fast - Fast scan of the top 300 popular ports
|
||||||
* nmap_detect_versions - detects versions of services and OS, runs on all 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_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.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,11 @@ alias nmap_fin="nmap -sF -v"
|
||||||
alias nmap_full="nmap -sS -T4 -PE -PP -PS80,443 -PY -g 53 -A -p1-65535 -v"
|
alias nmap_full="nmap -sS -T4 -PE -PP -PS80,443 -PY -g 53 -A -p1-65535 -v"
|
||||||
alias nmap_check_for_firewall="nmap -sA -p1-65535 -v -T4"
|
alias nmap_check_for_firewall="nmap -sA -p1-65535 -v -T4"
|
||||||
alias nmap_ping_through_firewall="nmap -PS -PA"
|
alias nmap_ping_through_firewall="nmap -PS -PA"
|
||||||
alias nmap_fast="nmap -F -T5 --top-ports 300"
|
alias nmap_fast="nmap -F -T5 --version-light --top-ports 300"
|
||||||
alias nmap_detect_versions="nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn"
|
alias nmap_detect_versions="nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn"
|
||||||
alias nmap_check_for_vulns="nmap --script=vulscan"
|
alias nmap_check_for_vulns="nmap --script=vulscan"
|
||||||
|
alias nmap_full_udp="nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443,3389 "
|
||||||
|
alias nmap_traceroute="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 "
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,9 @@
|
||||||
eval "$(npm completion 2>/dev/null)"
|
eval "$(npm completion 2>/dev/null)"
|
||||||
|
|
||||||
|
# Install dependencies globally
|
||||||
|
alias npmg="npm i -g "
|
||||||
|
|
||||||
# npm package names are lowercase
|
# npm package names are lowercase
|
||||||
# - https://twitter.com/substack/status/23122603153150361
|
|
||||||
# Thus, we've used camelCase for the following aliases:
|
# Thus, we've used camelCase for the following aliases:
|
||||||
|
|
||||||
# Install and save to dependencies in your package.json
|
# Install and save to dependencies in your package.json
|
||||||
|
|
@ -12,6 +13,7 @@ alias npmS="npm i -S "
|
||||||
# Install and save to dev-dependencies in your package.json
|
# Install and save to dev-dependencies in your package.json
|
||||||
# npmd is used by https://github.com/dominictarr/npmd
|
# npmd is used by https://github.com/dominictarr/npmd
|
||||||
alias npmD="npm i -D "
|
alias npmD="npm i -D "
|
||||||
|
|
||||||
# Execute command from node_modules folder based on current directory
|
# Execute command from node_modules folder based on current directory
|
||||||
# i.e npmE gulp
|
# i.e npmE gulp
|
||||||
alias npmE='PATH="$(npm bin)":"$PATH"'
|
alias npmE='PATH="$(npm bin)":"$PATH"'
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ alias rn='rake notes'
|
||||||
alias rr='rake routes'
|
alias rr='rake routes'
|
||||||
alias rrg='rake routes | grep'
|
alias rrg='rake routes | grep'
|
||||||
alias rt='rake test'
|
alias rt='rake test'
|
||||||
|
alias rmd='rake middleware'
|
||||||
|
|
||||||
# legacy stuff
|
# legacy stuff
|
||||||
alias sstat='thin --stats "/thin/stats" start'
|
alias sstat='thin --stats "/thin/stats" start'
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,10 @@ function simulator {
|
||||||
if [[ -d "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" ]]; then
|
if [[ -d "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" ]]; then
|
||||||
open "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app"
|
open "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app"
|
||||||
# Xcode ≥ 6.x
|
# Xcode ≥ 6.x
|
||||||
else
|
elif [[ -d "${devfolder}/Applications/iOS Simulator.app" ]]; then
|
||||||
open "${devfolder}/Applications/iOS Simulator.app"
|
open "${devfolder}/Applications/iOS Simulator.app"
|
||||||
|
# Xcode ≥ 7.x
|
||||||
|
else
|
||||||
|
open "${devfolder}/Applications/Simulator.app"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue