mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-04-03 04:20:01 +02:00
Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
9d7ec8c7d6
14 changed files with 91 additions and 27 deletions
|
|
@ -1,8 +1,5 @@
|
|||
# Gets OS Type
|
||||
unamestr=$(uname -s)
|
||||
|
||||
# If OSX
|
||||
if [[ "$unamestr" == 'Darwin' ]]; then
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
local _atom_paths > /dev/null 2>&1
|
||||
_atom_paths=(
|
||||
"$HOME/Applications/Atom.app"
|
||||
|
|
@ -15,8 +12,26 @@ if [[ "$unamestr" == 'Darwin' ]]; then
|
|||
break
|
||||
fi
|
||||
done
|
||||
# If Linux
|
||||
elif [[ "$unamestr" == 'Linux' ]]; then
|
||||
;;
|
||||
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."; }
|
||||
fi
|
||||
esac
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ _arguments -C \
|
|||
_cap_tasks() {
|
||||
if [[ -f config/deploy.rb || -f Capfile ]]; then
|
||||
if [[ ! -f .cap_tasks~ ]]; then
|
||||
shipit -v --tasks | sed 's/\(\[\)\(.*\)\(\]\)/\2:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~
|
||||
shipit --tasks | sed 's/\(\[\)\(.*\)\(\]\)/\2:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~
|
||||
fi
|
||||
|
||||
OLD_IFS=$IFS
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ _homebrew-installed() {
|
|||
}
|
||||
|
||||
_chruby-from-homebrew-installed() {
|
||||
[ -r $(brew --prefix chruby)] &> /dev/null
|
||||
[ -r $(brew --prefix chruby) ] &> /dev/null
|
||||
}
|
||||
|
||||
_ruby-build_installed() {
|
||||
|
|
|
|||
3
plugins/fedora/README.md
Normal file
3
plugins/fedora/README.md
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
This is a plugin based on yum plugin, but using dnf as main frontend
|
||||
(from Fedora 22 onwards, yum is deprecated in favor of dnf).
|
||||
|
||||
16
plugins/fedora/fedora.plugin.zsh
Normal file
16
plugins/fedora/fedora.plugin.zsh
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
## Aliases
|
||||
|
||||
alias dnfs="dnf search" # search package
|
||||
alias dnfp="dnf info" # show package info
|
||||
alias dnfl="dnf list" # list packages
|
||||
alias dnfgl="dnf grouplist" # list package groups
|
||||
alias dnfli="dnf list installed" # print all installed packages
|
||||
alias dnfmc="dnf makecache" # rebuilds the dnf package list
|
||||
|
||||
alias dnfu="sudo dnf upgrade" # upgrade packages
|
||||
alias dnfi="sudo dnf install" # install package
|
||||
alias dnfgi="sudo dnf groupinstall" # install package group
|
||||
alias dnfr="sudo dnf remove" # remove package
|
||||
alias dnfgr="sudo dnf groupremove" # remove pagage group
|
||||
alias dnfrl="sudo dnf remove --remove-leaves" # remove package and leaves
|
||||
alias dnfc="sudo dnf clean all" # clean cache
|
||||
|
|
@ -20,10 +20,10 @@
|
|||
# in the current directory.
|
||||
#
|
||||
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})
|
||||
compadd -- $completions
|
||||
}
|
||||
|
||||
compdef $$gulp_completion gulp
|
||||
compdef $$gulp_completion gulp
|
||||
|
|
|
|||
|
|
@ -61,8 +61,8 @@ Insertion
|
|||
Delete and Insert
|
||||
-----------------
|
||||
|
||||
- `ctrl-h` : While in *Insert mode*: delete character after the cursor
|
||||
- `ctrl-w` : While in *Insert mode*: delete word after the cursor
|
||||
- `ctrl-h` : While in *Insert mode*: delete character before the cursor
|
||||
- `ctrl-w` : While in *Insert mode*: delete word before the cursor
|
||||
- `d{motion}` : Delete text that {motion} moves over
|
||||
- `dd` : Delete line
|
||||
- `D` : Delete characters under the cursor until the end of the line
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue