text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: plugins/history-substring-search/history-substring-search.zsh
#!/usr/bin/env zsh
##############################################################################
#
# Copyright (c) 2009 Peter Stephenson
# Copyright (c) 2011 Guido van Steen
# Copyright (c) 2011 Suraj N. Kurapati
# Copyright (c) 2011 Sorin Ionescu... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/history-substring-search/history-substring-search.zsh", "license": "mit", "size": 26932} |
### File: plugins/history-substring-search/update-from-upstream.zsh
#!/usr/bin/env zsh
#
# update-from-upstream.zsh
#
# This script updates the Oh My Zsh version of the zsh-history-substring-search
# plugin from the independent upstream repo. This is to be run by OMZ developers
# when they want to pull in new changes f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/history-substring-search/update-from-upstream.zsh", "license": "mit", "size": 4163} |
### File: plugins/history/history.plugin.zsh
alias h='history'
alias hs='history | grep'
alias hsi='history | grep -i'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/history/history.plugin.zsh", "license": "mit", "size": 74} |
### File: plugins/hitchhiker/hitchhiker.plugin.zsh
# Handle $0 according to the standard:
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
HITCHHIKER_DIR="${0:h}/fortunes"
# Aliases
alias hitchhiker="fortune ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/hitchhiker/hitchhiker.plugin.zsh", "license": "mit", "size": 1046} |
### File: plugins/hitokoto/hitokoto.plugin.zsh
if ! (( $+commands[curl] )); then
echo "hitokoto plugin needs curl to work" >&2
return
fi
function hitokoto {
setopt localoptions nopromptsubst
# Get hitokoto data
local -a data
data=("${(ps:\n:)"$(command curl -s --connect-timeout 2 "https://v1.hitokoto.cn" ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/hitokoto/hitokoto.plugin.zsh", "license": "mit", "size": 489} |
### File: plugins/homestead/homestead.plugin.zsh
# Homestead basic command completion
_homestead_get_command_list () {
homestead --no-ansi | sed -E "1,/(Available|Common) commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_homestead () {
compadd `_homestead_get_command_list`
}
compdef _homestead homestead
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/homestead/homestead.plugin.zsh", "license": "mit", "size": 260} |
### File: plugins/invoke/invoke.plugin.zsh
# Autocompletion for invoke.
#
if [ $commands[invoke] ]; then
source <(invoke --print-completion-script=zsh)
fi
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/invoke/invoke.plugin.zsh", "license": "mit", "size": 114} |
### File: plugins/ionic/ionic.plugin.zsh
alias iv="ionic --version"
alias ih="ionic --help"
alias ist="ionic start"
alias ii="ionic info"
alias is="ionic serve"
alias icba="ionic cordova build android"
alias icbi="ionic cordova build ios"
alias icra="ionic cordova run android"
alias icri="ionic cordova run ios"
ali... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/ionic/ionic.plugin.zsh", "license": "mit", "size": 552} |
### File: plugins/isodate/isodate.plugin.zsh
# work with date ISO 8601 easy
alias isodate="date +%Y-%m-%dT%H:%M:%S%z"
alias isodate_utc="date -u +%Y-%m-%dT%H:%M:%SZ"
alias isodate_basic="date -u +%Y%m%dT%H%M%SZ"
alias unixstamp="date +%s"
alias date_locale="date +"%c""
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/isodate/isodate.plugin.zsh", "license": "mit", "size": 226} |
### File: plugins/istioctl/istioctl.plugin.zsh
if [ $commands[istioctl] ]; then
source <(istioctl completion zsh)
compdef _istioctl istioctl
fi
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/istioctl/istioctl.plugin.zsh", "license": "mit", "size": 101} |
### File: plugins/iterm2/iterm2.plugin.zsh
#####################################################
# iTerm2 plugin for oh-my-zsh #
# Author: Aviv Rosenberg (github.com/avivrosenberg) #
#####################################################
###
# This plugin is only relevant if the terminal is iTerm2... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/iterm2/iterm2.plugin.zsh", "license": "mit", "size": 2655} |
### File: plugins/iterm2/iterm2_shell_integration.zsh
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/iterm2/iterm2_shell_integration.zsh", "license": "mit", "size": 7087} |
### File: plugins/iterm2/update
#!/bin/sh
curl -s -L https://iterm2.com/shell_integration/zsh \
-o iterm2_shell_integration.zsh
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/iterm2/update", "license": "mit", "size": 99} |
### File: plugins/jake-node/jake-node.plugin.zsh
#---oh-my-zsh plugin : task Autocomplete for Jake tool---
# Jake : https://github.com/mde/jake
# Warning : Jakefile should have the right case : Jakefile or jakefile
# Tested on : MacOSX 10.7 (Lion), Ubuntu 11.10
# Author : Alexandre Lacheze (@al3xstrat)
# Inspiration : ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jake-node/jake-node.plugin.zsh", "license": "mit", "size": 575} |
### File: plugins/jenv/jenv.plugin.zsh
jenvdirs=("$HOME/.jenv" "/usr/local/bin/jenv" "/usr/local/jenv" "/opt/jenv")
FOUND_JENV=0
for jenvdir in $jenvdirs; do
if [[ -d "${jenvdir}/bin" ]]; then
FOUND_JENV=1
break
fi
done
if [[ $FOUND_JENV -eq 0 ]]; then
if (( $+commands[brew] )) && jenvdir=... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jenv/jenv.plugin.zsh", "license": "mit", "size": 897} |
### File: plugins/jfrog/jfrog.plugin.zsh
_jfrog() {
local -a opts
opts=("${(@f)$(_CLI_ZSH_AUTOCOMPLETE_HACK=1 ${words[@]:0:#words[@]-1} --generate-bash-completion)}")
_describe 'values' opts
if [[ $compstate[nmatches] -eq 0 && $words[$CURRENT] != -* ]]; then
_files
fi
}
compdef _jfrog jfrog
compdef _jfrog jf
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jfrog/jfrog.plugin.zsh", "license": "mit", "size": 277} |
### File: plugins/jira/jira.plugin.zsh
# CLI support for JIRA interaction
#
# See README.md for details
function jira() {
emulate -L zsh
local action jira_url jira_prefix
if [[ -n "$1" ]]; then
action=$1
elif [[ -f .jira-default-action ]]; then
action=$(cat .jira-default-action)
elif [[ -f ~/.jira-de... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jira/jira.plugin.zsh", "license": "mit", "size": 4213} |
### File: plugins/jruby/jruby.plugin.zsh
# Aliases
alias jrspec='jruby --debug -S rspec --debug'
alias jprofile='jruby --profile.api -S rspec'
alias jexec='jruby -S'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jruby/jruby.plugin.zsh", "license": "mit", "size": 125} |
### File: plugins/jsontools/jsontools.plugin.zsh
# JSON Tools
# Adds command line aliases useful for dealing with JSON
# Check that user-defined method is installed
if [[ -n "$JSONTOOLS_METHOD" ]]; then
(( $+commands[$JSONTOOLS_METHOD] )) || unset JSONTOOLS_METHOD
fi
# If method undefined, find the first one that i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jsontools/jsontools.plugin.zsh", "license": "mit", "size": 2883} |
### File: plugins/juju/juju.plugin.zsh
# ---------------------------------------------------------- #
# Aliases and functions for juju (https://juju.is) #
# ---------------------------------------------------------- #
# Load TAB completions
# You need juju's bash completion script installed. By default bash-... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/juju/juju.plugin.zsh", "license": "mit", "size": 6567} |
### File: plugins/jump/jump.plugin.zsh
# Easily jump around the file system by manually adding marks
# marks are stored as symbolic links in the directory $MARKPATH (default $HOME/.marks)
#
# jump FOO: jump to a mark named FOO
# mark FOO: create a mark named FOO
# unmark FOO: delete a mark
# marks: lists all marks
#
ex... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/jump/jump.plugin.zsh", "license": "mit", "size": 1445} |
### File: plugins/kate/kate.plugin.zsh
# Kate
# Start kate always silent
alias kate='kate >/dev/null 2>&1'
function kt () {
cd $1
kate $1
} | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/kate/kate.plugin.zsh", "license": "mit", "size": 106} |
### File: plugins/keychain/keychain.plugin.zsh
(( $+commands[keychain] )) || return
# Define SHORT_HOST if not defined (%m = host name up to first .)
SHORT_HOST=${SHORT_HOST:-${(%):-%m}}
function {
local agents
local -a identities
local -a options
local _keychain_env_sh
local _keychain_env_sh_gpg
# load agents... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/keychain/keychain.plugin.zsh", "license": "mit", "size": 920} |
### File: plugins/kn/kn.plugin.zsh
# Autocompletion for kn, the command line interface for knative
#
# Author: https://github.com/btannous
if [ $commands[kn] ]; then
source <(kn completion zsh)
compdef _kn kn
fi
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/kn/kn.plugin.zsh", "license": "mit", "size": 183} |
### File: plugins/knife_ssh/knife_ssh.plugin.zsh
function knife_ssh() {
grep -q $1 ~/.knife_comp~ 2> /dev/null || rm -f ~/.knife_comp~
ssh $(knife node show $1 | awk '/IP:/{print $2}')
}
_knife_ssh() {
if hash knife 2>/dev/null; then
if [[ ! -f ~/.knife_comp~ ]]; then
echo "\nGenerating ~/.knife_comp~.... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/knife_ssh/knife_ssh.plugin.zsh", "license": "mit", "size": 437} |
### File: plugins/kops/kops.plugin.zsh
if [ $commands[kops] ]; then
source <(kops completion zsh)
fi
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/kops/kops.plugin.zsh", "license": "mit", "size": 64} |
### File: plugins/kube-ps1/kube-ps1.plugin.zsh
#!/usr/bin/env bash
# Kubernetes prompt helper for bash/zsh
# Displays current context and namespace
# Copyright 2021 Jon Mosco
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/kube-ps1/kube-ps1.plugin.zsh", "license": "mit", "size": 11323} |
### File: plugins/kubectl/kubectl.plugin.zsh
if (( ! $+commands[kubectl] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `kubectl`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_kubectl" ]]; then
typeset -g -A _comps
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/kubectl/kubectl.plugin.zsh", "license": "mit", "size": 5488} |
### File: plugins/kubectx/kubectx.plugin.zsh
typeset -g -A kubectx_mapping
function kubectx_prompt_info() {
(( $+commands[kubectl] )) || return
local current_ctx=$(kubectl config current-context 2> /dev/null)
[[ -n "$current_ctx" ]] || return
# use value in associative array if it exists
# otherwise fall ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/kubectx/kubectx.plugin.zsh", "license": "mit", "size": 368} |
### File: plugins/lando/lando.plugin.zsh
# Settings
: ${LANDO_ZSH_SITES_DIRECTORY:="$HOME/Sites"}
: ${LANDO_ZSH_CONFIG_FILE:=.lando.yml}
# Enable multiple commands with lando.
function artisan \
composer \
drush \
gulp \
npm \
php \
wp \
yarn {
if checkF... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/lando/lando.plugin.zsh", "license": "mit", "size": 1048} |
### File: plugins/laravel/laravel.plugin.zsh
#!zsh
alias artisan='php artisan'
alias bob='php artisan bob::build'
# Development
alias pas='php artisan serve'
# Database
alias pam='php artisan migrate'
alias pamf='php artisan migrate:fresh'
alias pamfs='php artisan migrate:fresh --seed'
alias pamr='php artisan migrate... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/laravel/laravel.plugin.zsh", "license": "mit", "size": 1150} |
### File: plugins/laravel4/laravel4.plugin.zsh
# Laravel4 basic command completion
_laravel4_get_command_list () {
php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }'
}
_laravel4 () {
if [ -f artisan ]; then
compadd `_laravel4_get_command_list`
fi
}
compdef _laravel4 artisa... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/laravel4/laravel4.plugin.zsh", "license": "mit", "size": 450} |
### File: plugins/laravel5/laravel5.plugin.zsh
# Alias
alias la5='php artisan'
alias la5cache='php artisan cache:clear'
alias la5routes='php artisan route:list'
alias la5vendor='php artisan vendor:publish'
# Laravel5 basic command completion
_laravel5_get_command_list () {
php artisan --raw --no-ansi list | sed "s/[... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/laravel5/laravel5.plugin.zsh", "license": "mit", "size": 434} |
### File: plugins/last-working-dir/last-working-dir.plugin.zsh
# Flag indicating if we've previously jumped to last directory
typeset -g ZSH_LAST_WORKING_DIRECTORY
# Updates the last directory once directory is changed
autoload -U add-zsh-hook
add-zsh-hook chpwd chpwd_last_working_dir
chpwd_last_working_dir() {
# Do... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/last-working-dir/last-working-dir.plugin.zsh", "license": "mit", "size": 1043} |
### File: plugins/lighthouse/lighthouse.plugin.zsh
open_lighthouse_ticket () {
if [ ! -f .lighthouse-url ]; then
echo "There is no .lighthouse-url file in the current directory..."
return 0
fi
lighthouse_url=$(cat .lighthouse-url)
echo "Opening ticket #$1"
open_command "$lighthouse_url/tickets/$1"
}
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/lighthouse/lighthouse.plugin.zsh", "license": "mit", "size": 305} |
### File: plugins/lol/lol.plugin.zsh
# LOL!!1
# Source: https://aur.archlinux.org/packages/lolbash/lolbash/lolbash.sh
alias wtf='dmesg'
alias onoz='cat /var/log/errors.log'
alias rtfm='man'
alias :3='echo'
alias visible='echo'
alias invisible='cat'
alias moar='more'
alias tldr='less'
alias alwayz='tail -f'
alias ica... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/lol/lol.plugin.zsh", "license": "mit", "size": 959} |
### File: plugins/lpass/_lpass
#compdef lpass
_lpass() {
local cmd has_color has_sync has_interactive
if (( CURRENT > 2)); then
cmd=${words[2]}
# Set the context for the subcommand.
curcontext="${curcontext%:*:*}:lpass-$cmd"
# Narrow the range of words we are looking at to exclud... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/lpass/_lpass", "license": "mit", "size": 6249} |
### File: plugins/lxd/lxd.plugin.zsh
_lxc_get_command_list () {
$_comp_command1 | sed "1,/Available Commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
}
_lxc_get_subcommand_list () {
$_comp_command1 ${words[2]} | sed "1,/Available Commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
}
_lxc () {
local curcontext="... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/lxd/lxd.plugin.zsh", "license": "mit", "size": 548} |
### File: plugins/macos/macos.plugin.zsh
# Handle $0 according to the standard:
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
0="${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}"
0="${${(M)0:#/*}:-$PWD/$0}"
# Open the current directory in a Finder window
alias ofd='open_command $PWD'
#... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/macos/macos.plugin.zsh", "license": "mit", "size": 7209} |
### File: plugins/macos/music
#!/usr/bin/env zsh
function music itunes() {
local APP_NAME=Music sw_vers=$(sw_vers -productVersion 2>/dev/null)
autoload is-at-least
if [[ -z "$sw_vers" ]] || is-at-least 10.15 $sw_vers; then
if [[ $0 = itunes ]]; then
echo >&2 The itunes function name is deprecated. Use... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/macos/music", "license": "mit", "size": 5791} |
### File: plugins/macos/spotify
#!/usr/bin/env bash
function spotify() {
# Copyright (c) 2012--2019 Harish Narayanan <mail@harishnarayanan.org>
#
# Contains numerous helpful contributions from Jorge Colindres, Thomas
# Pritchard, iLan Epstein, Gabriele Bonetti, Sean Heller, Eric Martin
# and Peter Fonseca.
# Permissi... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/macos/spotify", "license": "mit", "size": 19966} |
### File: plugins/macports/macports.plugin.zsh
alias pc="sudo port clean --all installed"
alias pi="sudo port install"
alias pli="port livecheck installed"
alias plm="port-livecheck-maintainer"
alias psu="sudo port selfupdate"
alias puni="sudo port uninstall inactive"
alias puo="sudo port upgrade outdated"
alias pup="s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/macports/macports.plugin.zsh", "license": "mit", "size": 987} |
### File: plugins/magic-enter/magic-enter.plugin.zsh
# Default commands
: ${MAGIC_ENTER_GIT_COMMAND:="git status -u ."} # run when in a git repository
: ${MAGIC_ENTER_OTHER_COMMAND:="ls -lh ."} # run anywhere else
magic-enter() {
# Only run MAGIC_ENTER commands when in PS1 and command line is empty
# http://z... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/magic-enter/magic-enter.plugin.zsh", "license": "mit", "size": 1263} |
### File: plugins/man/man.plugin.zsh
# ------------------------------------------------------------------------------
# Author
# ------
#
# * Jerry Ling<jerryling315@gmail.com>
#
# ------------------------------------------------------------------------------
# Usage
# -----
#
# man will be inserted before the command
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/man/man.plugin.zsh", "license": "mit", "size": 1064} |
### File: plugins/marked2/marked2.plugin.zsh
#
# If marked is called without an argument, open Marked
# If marked is passed a file, open it in Marked
#
function marked() {
open -a "marked 2.app" "$1"
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/marked2/marked2.plugin.zsh", "license": "mit", "size": 161} |
### File: plugins/marktext/marktext.plugin.zsh
#
# If marktext is called without an argument, open MarkText
# If marktext is passed a file, open it in MarkText
#
function marktext() {
open -a "MarkText.app" "$1"
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/marktext/marktext.plugin.zsh", "license": "mit", "size": 171} |
### File: plugins/mercurial/mercurial.plugin.zsh
# aliases
alias hga='hg add'
alias hgc='hg commit'
alias hgca='hg commit --amend'
alias hgci='hg commit --interactive'
alias hgb='hg branch'
alias hgba='hg branches'
alias hgbk='hg bookmarks'
alias hgco='hg checkout'
alias hgd='hg diff'
alias hged='hg diffmerge'
alias hg... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mercurial/mercurial.plugin.zsh", "license": "mit", "size": 2377} |
### File: plugins/meteor/meteor.plugin.zsh
# Aliases in alphabetical order
alias ma='meteor add' # Add a package to this project.
alias map='meteor add-platform' # Add a platform to this project.
alias mad='meteor admin' # Administrative commands.
alias mau='meteor authorized' ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/meteor/meteor.plugin.zsh", "license": "mit", "size": 2707} |
### File: plugins/microk8s/microk8s.plugin.zsh
# ---------------------------------------------------------- #
# Aliases and Completions for MicroK8s (https://microk8s.io) #
# Author: Shaun Tabone (https://github.com/xontab) #
# ---------------------------------------------------------- #
# Helper function to... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/microk8s/microk8s.plugin.zsh", "license": "mit", "size": 2966} |
### File: plugins/minikube/minikube.plugin.zsh
# Autocompletion for Minikube.
#
if (( $+commands[minikube] )); then
__MINIKUBE_COMPLETION_FILE="${ZSH_CACHE_DIR}/minikube_completion"
if [[ ! -f $__MINIKUBE_COMPLETION_FILE ]]; then
minikube completion zsh >! $__MINIKUBE_COMPLETION_FILE
fi
[[ -f ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/minikube/minikube.plugin.zsh", "license": "mit", "size": 383} |
### File: plugins/mix-fast/mix-fast.plugin.zsh
_mix_refresh () {
if [ -f .mix_tasks ]; then
rm .mix_tasks
fi
echo "Generating .mix_tasks..." > /dev/stderr
_mix_generate
cat .mix_tasks
}
_mix_does_task_list_need_generating () {
[ ! -f .mix_tasks ];
}
_mix_generate () {
mix help | grep '^mix [^ ]' | s... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mix-fast/mix-fast.plugin.zsh", "license": "mit", "size": 622} |
### File: plugins/mongo-atlas/mongo-atlas.plugin.zsh
# Autocompletion for the Mongo Atlas CLI (atlas).
if (( ! $+commands[atlas] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `atlas`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mongo-atlas/mongo-atlas.plugin.zsh", "license": "mit", "size": 430} |
### File: plugins/mongocli/mongocli.plugin.zsh
alias ma='mongocli atlas'
alias mcm='mongocli cloud-manager'
alias mom='mongocli ops-manager'
alias miam='mongocli iam'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mongocli/mongocli.plugin.zsh", "license": "mit", "size": 120} |
### File: plugins/mosh/mosh.plugin.zsh
# Allow SSH tab completion for mosh hostnames
compdef mosh=ssh
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mosh/mosh.plugin.zsh", "license": "mit", "size": 63} |
### File: plugins/multipass/multipass.plugin.zsh
alias mp="multipass"
alias mpl="multipass list"
alias mpla="multipass launch"
alias mpln="multipass launch --network en0 --network name=bridge0,mode=manual"
alias mps="multipass shell"
alias mpsp="multipass stop"
alias mpst="multipass start"
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/multipass/multipass.plugin.zsh", "license": "mit", "size": 242} |
### File: plugins/mvn/mvn.plugin.zsh
# Calls mvnw if found in the current project, otherwise execute the original mvn
mvn-or-mvnw() {
local dir="$PWD"
while [[ ! -x "$dir/mvnw" && "$dir" != / ]]; do
dir="${dir:h}"
done
if [[ -x "$dir/mvnw" ]]; then
echo "Running \`$dir/mvnw\`..." >&2
"$dir/mvnw" "$... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mvn/mvn.plugin.zsh", "license": "mit", "size": 14952} |
### File: plugins/mysql-macports/mysql-macports.plugin.zsh
# commands to control local mysql-server installation
# paths are for osx installation via macports
alias mysqlstart='sudo /opt/local/share/mysql5/mysql/mysql.server start'
alias mysqlstop='sudo /opt/local/share/mysql5/mysql/mysql.server stop'
alias mysqlresta... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/mysql-macports/mysql-macports.plugin.zsh", "license": "mit", "size": 371} |
### File: plugins/n98-magerun/n98-magerun.plugin.zsh
# ------------------------------------------------------------------------------
# FILE: n98-magerun.plugin.zsh
# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin
# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
# AUTHOR: Jisse Reit... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/n98-magerun/n98-magerun.plugin.zsh", "license": "mit", "size": 1273} |
### File: plugins/nanoc/nanoc.plugin.zsh
alias n='nanoc'
alias nco='nanoc compile'
alias ncs='nanoc create-site'
alias nd='nanoc deploy'
alias np='nanoc prune'
alias nv='nanoc view'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/nanoc/nanoc.plugin.zsh", "license": "mit", "size": 141} |
### File: plugins/nats/nats.plugin.zsh
if (( $+commands[nsc] )); then
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `nsc`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_nsc" ]]; then
typeset -g -A _comps
autoload -Uz _nsc
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/nats/nats.plugin.zsh", "license": "mit", "size": 756} |
### File: plugins/nmap/nmap.plugin.zsh
# Some useful nmap aliases for scan modes
# 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)
#... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/nmap/nmap.plugin.zsh", "license": "mit", "size": 1594} |
### File: plugins/node/node.plugin.zsh
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
local section=${1:-all}
open_command "https://nodejs.org/docs/$(node --version)/api/$section.html"
}
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/node/node.plugin.zsh", "license": "mit", "size": 241} |
### File: plugins/nodenv/nodenv.plugin.zsh
# This plugin loads nodenv into the current shell and provides prompt info via
# the 'nodenv_prompt_info' function.
FOUND_NODENV=${+commands[nodenv]}
if [[ $FOUND_NODENV -ne 1 ]]; then
nodenvdirs=(
"$HOME/.nodenv"
"/usr/local/nodenv"
"/opt/nodenv"
"/usr/loc... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/nodenv/nodenv.plugin.zsh", "license": "mit", "size": 992} |
### File: plugins/npm/npm.plugin.zsh
(( $+commands[npm] )) && {
command rm -f "${ZSH_CACHE_DIR:-$ZSH/cache}/npm_completion"
_npm_completion() {
local si=$IFS
compadd -- $(COMP_CWORD=$((CURRENT-1)) \
COMP_LINE=$BUFFER \
COMP_POINT=0 \
npm completion -- "${w... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/npm/npm.plugin.zsh", "license": "mit", "size": 2743} |
### File: plugins/nvm/nvm.plugin.zsh
# See https://github.com/nvm-sh/nvm#installation-and-update
if [[ -z "$NVM_DIR" ]]; then
if [[ -d "$HOME/.nvm" ]]; then
export NVM_DIR="$HOME/.nvm"
elif [[ -d "${XDG_CONFIG_HOME:-$HOME/.config}/nvm" ]]; then
export NVM_DIR="${XDG_CONFIG_HOME:-$HOME/.config}/nvm"
elif (... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/nvm/nvm.plugin.zsh", "license": "mit", "size": 3566} |
### File: plugins/oc/oc.plugin.zsh
# Autocompletion for oc, the command line interface for OpenShift
#
# Author: https://github.com/kevinkirkup
if [ $commands[oc] ]; then
source <(oc completion zsh)
compdef _oc oc
fi
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/oc/oc.plugin.zsh", "license": "mit", "size": 187} |
### File: plugins/octozen/octozen.plugin.zsh
# octozen plugin
# Displays a zen quote from octocat
function display_octozen() {
curl -m 2 -fsL "https://api.github.com/octocat"
add-zsh-hook -d precmd display_octozen
}
# Display the octocat on the first precmd, after the whole starting process has finished
autoload ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/octozen/octozen.plugin.zsh", "license": "mit", "size": 328} |
### File: plugins/operator-sdk/operator-sdk.plugin.zsh
if [ $commands[operator-sdk] ]; then
source <(operator-sdk completion zsh)
compdef _operator-sdk operator-sdk
fi
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/operator-sdk/operator-sdk.plugin.zsh", "license": "mit", "size": 117} |
### File: plugins/otp/otp.plugin.zsh
export OTP_HOME=~/.otp
mkdir -p $OTP_HOME
function ot () {
if ! command -v oathtool > /dev/null 2>&1; then
echo "Note: you need to install oathtool or oath-toolkit, depending on your OS or distribution."
return 1
fi
if ! command -v gpg > /dev/null 2>&1; then
echo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/otp/otp.plugin.zsh", "license": "mit", "size": 1239} |
### File: plugins/paver/paver.plugin.zsh
_paver_does_target_list_need_generating () {
[ ! -f .paver_targets ] && return 0
[ pavement.py -nt .paver_targets ] && return 0
return 1
}
_paver () {
if [ -f pavement.py ]; then
if _paver_does_target_list_need_generating; then
paver --help 2>&1 |grep '-'|grep... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/paver/paver.plugin.zsh", "license": "mit", "size": 411} |
### File: plugins/per-directory-history/per-directory-history.plugin.zsh
per-directory-history.zsh | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/per-directory-history/per-directory-history.plugin.zsh", "license": "mit", "size": 25} |
### File: plugins/per-directory-history/per-directory-history.zsh
#!/usr/bin/env zsh
#
# This is a implementation of per directory history for zsh, some
# implementations of which exist in bash[1,2]. It also implements
# a per-directory-history-toggle-history function to change from using the
# directory history to us... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/per-directory-history/per-directory-history.zsh", "license": "mit", "size": 6500} |
### File: plugins/percol/percol.plugin.zsh
(( ${+commands[percol]} )) || return
function percol_select_history() {
# print history in reverse order (from -1 (latest) to 1 (oldest))
BUFFER=$(fc -l -n -1 1 | percol --query "$LBUFFER")
CURSOR=$#BUFFER
zle -R -c
}
zle -N percol_select_history
bindkey -M emacs '^R'... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/percol/percol.plugin.zsh", "license": "mit", "size": 806} |
### File: plugins/perl/perl.plugin.zsh
# https://github.com/dbbolton
#
# Below are some useful Perl-related aliases/functions that I use with zsh.
# Aliases ###################################################################
# perlbrew ########
alias pbi='perlbrew install'
alias pbl='perlbrew list'
alias pbo='perlbr... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/perl/perl.plugin.zsh", "license": "mit", "size": 1466} |
### File: plugins/perms/perms.plugin.zsh
# Some useful commands for setting permissions.
#
# Rory Hardy [GneatGeek]
# Andrew Janke [apjanke]
### Aliases
# Set all files' permissions to 644 recursively in a directory
function set644 {
find "${@:-.}" -type f ! -perm 644 -print0 | xargs -0 chmod 644
}
# Set all direct... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/perms/perms.plugin.zsh", "license": "mit", "size": 2736} |
### File: plugins/phing/phing.plugin.zsh
_phing () {
if [ -f build.xml ]; then
compadd $(phing -l|grep -v "\[property\]"|grep -v "Buildfile"|sed 1d|grep -v ":$" |grep -v "^\-*$"|grep -v "Warning:"|awk '{print $1}')
fi
}
compdef _phing phing
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/phing/phing.plugin.zsh", "license": "mit", "size": 209} |
### File: plugins/pip/pip.plugin.zsh
# Usage:
# Just add pip to your installed plugins.
# If you would like to change the cheeseshops used for autocomplete set
# ZSH_PIP_INDEXES in your zshrc. If one of your indexes are bogus you won't get
# any kind of error message, pip will just not autocomplete from them. Double
#... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pip/pip.plugin.zsh", "license": "mit", "size": 3898} |
### File: plugins/pipenv/pipenv.plugin.zsh
if (( ! $+commands[pipenv] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `pipenv`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_pipenv" ]]; then
typeset -g -A _comps
aut... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pipenv/pipenv.plugin.zsh", "license": "mit", "size": 1338} |
### File: plugins/pj/pj.plugin.zsh
alias pjo="pj open"
function pj() {
local cmd="cd"
local project="$1"
if [[ "open" == "$project" ]]; then
shift
project=$*
cmd=${=EDITOR}
else
project=$*
fi
for basedir ($PROJECT_PATHS); do
if [[ -d "$basedir/$project" ]]; then
$cmd "$basedir/$... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pj/pj.plugin.zsh", "license": "mit", "size": 511} |
### File: plugins/please/please.plugin.zsh
if (( $+commands[plz] )); then
source <(plz --completion_script)
fi
alias pb='plz build'
alias pt='plz test'
alias pw='plz watch'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/please/please.plugin.zsh", "license": "mit", "size": 135} |
### File: plugins/pm2/_pm2
#!/bin/zsh -f
#compdef pm2
#autoload
local -a _1st_arguments
_1st_arguments=(
"start:start and daemonize an app"
"trigger:trigger process action"
"deploy:deploy your json"
"startOrRestart:start or restart JSON file"
"startOrReload:start or gracefully reload JSON file"
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pm2/_pm2", "license": "mit", "size": 5879} |
### File: plugins/pm2/pm2.plugin.zsh
alias p2s='pm2 start'
alias p2o='pm2 stop'
alias p2d='pm2 delete'
alias p2r='pm2 restart'
alias p2i='pm2 list'
alias p2l='pm2 logs'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pm2/pm2.plugin.zsh", "license": "mit", "size": 132} |
### File: plugins/pod/_pod
#compdef pod
#autoload
# setopt XTRACE VERBOSE
# vim: ft=zsh sw=2 ts=2 et
# -----------------------------------------------------------------------------
# FILE: _pod
# DESCRIPTION: CocoaPods (0.33.1) autocomplete plugin for Oh-My-Zsh
# https://cocoapods.org
# ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pod/_pod", "license": "mit", "size": 23434} |
### File: plugins/poetry/poetry.plugin.zsh
# Return immediately if poetry is not found
if (( ! $+commands[poetry] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `poetry`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/poetry/poetry.plugin.zsh", "license": "mit", "size": 434} |
### File: plugins/postgres/postgres.plugin.zsh
# Aliases to control Postgres
# Paths noted below are for Postgres installed via Homebrew on OSX
if (( ! $+commands[brew] )); then
return
fi
local PG_BREW_DIR=$(brew --prefix)/var/postgres
alias startpost="pg_ctl -D $PG_BREW_DIR -l $PG_BREW_DIR/server.log start"
alias ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/postgres/postgres.plugin.zsh", "license": "mit", "size": 480} |
### File: plugins/pow/pow.plugin.zsh
# Restart a rack app running under pow
# http://pow.cx/
#
# Adds a kapow command that will restart an app
#
# $ kapow myapp
#
# Supports command completion.
#
# If you are not already using completion you might need to enable it with
#
# autoload -U compinit compinit
#
# Change... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pow/pow.plugin.zsh", "license": "mit", "size": 2078} |
### File: plugins/pre-commit/pre-commit.plugin.zsh
# Aliases for pre-commit
alias prc='pre-commit'
alias prcau='pre-commit autoupdate'
alias prcr='pre-commit run'
alias prcra='pre-commit run --all-files'
alias prcrf='pre-commit run --files'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pre-commit/pre-commit.plugin.zsh", "license": "mit", "size": 192} |
### File: plugins/profiles/profiles.plugin.zsh
# You will probably want to list this plugin as the first in your .zshrc.
# This will look for a custom profile for the local machine and each domain or
# subdomain it belongs to. (e.g. com, example.com and foo.example.com)
parts=(${(s:.:)HOST})
for i in {${#parts}..1}; d... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/profiles/profiles.plugin.zsh", "license": "mit", "size": 405} |
### File: plugins/pyenv/pyenv.plugin.zsh
pyenv_config_warning() {
[[ "$ZSH_PYENV_QUIET" != true ]] || return 0
local reason="$1"
local pyenv_root="${PYENV_ROOT/#$HOME/\$HOME}"
cat >&2 <<EOF
Found pyenv, but it is badly configured ($reason). pyenv might not
work correctly for non-interactive shells (for example... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pyenv/pyenv.plugin.zsh", "license": "mit", "size": 3108} |
### File: plugins/pylint/pylint.plugin.zsh
alias pylint-quick='pylint --reports=n'
| {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/pylint/pylint.plugin.zsh", "license": "mit", "size": 40} |
### File: plugins/python/python.plugin.zsh
# python command
alias py='python3'
# Find python file
alias pyfind='find . -name "*.py"'
# Remove python compiled byte-code and mypy/pytest cache in either the current
# directory or in a list of specified directories (including sub directories).
function pyclean() {
find... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/python/python.plugin.zsh", "license": "mit", "size": 2563} |
### File: plugins/qrcode/qrcode.plugin.zsh
# Imported and improved from https://qrcode.show/, section SHELL FUNCTIONS
_qrcode_show_message() {
echo "Type or paste your text, add a new blank line, and press ^d"
}
qrcode () {
local input="$*"
[ -z "$input" ] && _qrcode_show_message && local input="@/dev/stdin"
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/qrcode/qrcode.plugin.zsh", "license": "mit", "size": 486} |
### File: plugins/rails/_rails
#compdef rails
# ------------------------------------------------------------------------------
# Copyright (c) 2016 GitHub zsh-users - http://github.com/zsh-users
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rails/_rails", "license": "mit", "size": 19496} |
### File: plugins/rails/rails.plugin.zsh
# rails command wrapper
function _rails_command () {
if [ -e "bin/stubs/rails" ]; then
bin/stubs/rails $@
elif [ -e "bin/rails" ]; then
bin/rails $@
elif [ -e "script/rails" ]; then
ruby script/rails $@
elif [ -e "script/server" ]; then
ruby script/$@
e... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rails/rails.plugin.zsh", "license": "mit", "size": 3041} |
### File: plugins/rake-fast/rake-fast.plugin.zsh
_rake_does_task_list_need_generating () {
[[ ! -f .rake_tasks ]] || [[ Rakefile -nt .rake_tasks ]] || { _is_rails_app && _tasks_changed }
}
_is_rails_app () {
[[ -e "bin/rails" ]] || [[ -e "script/rails" ]]
}
_tasks_changed () {
local -a files
files=(lib/tasks ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rake-fast/rake-fast.plugin.zsh", "license": "mit", "size": 862} |
### File: plugins/rake/rake.plugin.zsh
# Thank you Jim for everything you contributed to the Ruby and open source community
# over the years. We will miss you dearly.
alias jimweirich='rake'
alias rake='noglob rake' # allows square brackts for rake task invocation
alias 'bin/rake'='noglob bin/rake' ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rake/rake.plugin.zsh", "license": "mit", "size": 530} |
### File: plugins/rand-quote/rand-quote.plugin.zsh
if ! (( $+commands[curl] )); then
echo "rand-quote plugin needs curl to work" >&2
return
fi
function quote {
setopt localoptions nopromptsubst
# Get random quote data
local data
data="$(command curl -s --connect-timeout 2 "http://www.quotationspage.com/ra... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rand-quote/rand-quote.plugin.zsh", "license": "mit", "size": 699} |
### File: plugins/rbenv/rbenv.plugin.zsh
# This plugin loads rbenv into the current shell and provides prompt info via
# the 'rbenv_prompt_info' function.
FOUND_RBENV=$+commands[rbenv]
if [[ $FOUND_RBENV -ne 1 ]]; then
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
for dir in $r... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rbenv/rbenv.plugin.zsh", "license": "mit", "size": 2016} |
### File: plugins/rbfu/rbfu.plugin.zsh
# Enables rbfu with --auto option, if available.
#
# Also provides a command to list all installed/available
# rubies. To ensure compatibility with themes, creates the
# rvm_prompt_info function to return the $RBFU_RUBY_VERSION
# version.
command -v rbfu &>/dev/null || return
ev... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rbfu/rbfu.plugin.zsh", "license": "mit", "size": 1478} |
### File: plugins/rbw/rbw.plugin.zsh
if (( ! $+commands[rbw] )); then
return
fi
# If the completion file doesn't exist yet, we need to autoload it and
# bind it to `rbw`. Otherwise, compinit will have already done that.
if [[ ! -f "$ZSH_CACHE_DIR/completions/_rbw" ]]; then
typeset -g -A _comps
autoload -Uz _rbw
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Shell", "repo_name": "minhanghuang/oh-my-zsh", "path": "plugins/rbw/rbw.plugin.zsh", "license": "mit", "size": 1040} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.