code
stringlengths
1
1.05M
repo_name
stringlengths
4
119
path
stringlengths
1
265
language
stringclasses
304 values
license
stringclasses
27 values
size
int64
1
1.05M
FROM ruby:2.5.3-alpine RUN apk add --no-cache autoconf RUN apk add --no-cache libtool RUN apk add --no-cache libcap-dev RUN apk add --no-cache pcre-dev RUN apk add --no-cache curl RUN apk add --no-cache build-base RUN apk add --no-cache ncurses-dev RUN apk add --no-cache tmux WORKDIR /zsh-autosuggestions ADD ZSH_VER...
zsh/zsh-autosuggestions
Dockerfile
Dockerfile
mit
563
source 'https://rubygems.org' gem 'rspec' gem 'rspec-wait' gem 'pry-byebug'
zsh/zsh-autosuggestions
Gemfile
Ruby
mit
77
SRC_DIR := ./src SRC_FILES := \ $(SRC_DIR)/config.zsh \ $(SRC_DIR)/util.zsh \ $(SRC_DIR)/bind.zsh \ $(SRC_DIR)/highlight.zsh \ $(SRC_DIR)/widgets.zsh \ $(SRC_DIR)/strategies/*.zsh \ $(SRC_DIR)/fetch.zsh \ $(SRC_DIR)/async.zsh \ $(SRC_DIR)/start.zsh HEADER_FILES := \ DESCRIPTION \ URL \ VERSION \ LICEN...
zsh/zsh-autosuggestions
Makefile
Makefile
mit
682
#!/bin/sh set -ex for v in $(grep "^[^#]" ZSH_VERSIONS); do mkdir zsh-$v cd zsh-$v curl -L https://api.github.com/repos/zsh-users/zsh/tarball/zsh-$v | tar xz --strip=1 ./Util/preconfig ./configure --enable-pcre \ --enable-cap \ --enable-multibyte \ --with-term-lib...
zsh/zsh-autosuggestions
install_test_zsh.sh
Shell
mit
503
require 'pry' require 'rspec/wait' require 'terminal_session' require 'tempfile' RSpec.shared_context 'terminal session' do let(:term_opts) { {} } let(:session) { TerminalSession.new(term_opts) } let(:before_sourcing) { -> {} } let(:after_sourcing) { -> {} } let(:options) { [] } around do |example| be...
zsh/zsh-autosuggestions
spec/spec_helper.rb
Ruby
mit
1,189
shared_examples 'special characters' do describe 'a special character in the buffer should be treated like any other character' do it 'asterisk' do with_history('echo "hello*"', 'echo "hello."') do session.send_string('echo "hello*') wait_for { session.content }.to eq('echo "hello*"') ...
zsh/zsh-autosuggestions
spec/strategies/special_characters_helper.rb
Ruby
mit
2,113
require 'securerandom' class TerminalSession ZSH_BIN = ENV['TEST_ZSH_BIN'] || 'zsh' def initialize(opts = {}) opts = { width: 80, height: 24, prompt: '', term: 'xterm-256color', zsh_bin: ZSH_BIN }.merge(opts) @opts = opts cmd="PS1=\"#{opts[:prompt]}\" TERM=#{opts[:t...
zsh/zsh-autosuggestions
spec/terminal_session.rb
Ruby
mit
1,753
#--------------------------------------------------------------------# # Async # #--------------------------------------------------------------------# _zsh_autosuggest_async_request() { zmodload zsh/system 2>/dev/null # For `$sysparams` typeset -g _ZSH_...
zsh/zsh-autosuggestions
src/async.zsh
Shell
mit
2,551
#--------------------------------------------------------------------# # Widget Helpers # #--------------------------------------------------------------------# _zsh_autosuggest_incr_bind_count() { typeset -gi bind_count=$((_ZSH_AUTOSUGGEST_BIND_COUNTS[$1]+1)) _ZS...
zsh/zsh-autosuggestions
src/bind.zsh
Shell
mit
3,366
#--------------------------------------------------------------------# # Global Configuration Variables # #--------------------------------------------------------------------# # Color to use when highlighting suggestion # Uses format of `region_highlight` # More info: http://zsh.s...
zsh/zsh-autosuggestions
src/config.zsh
Shell
mit
2,719
#--------------------------------------------------------------------# # Fetch Suggestion # #--------------------------------------------------------------------# # Loops through all specified strategies and returns a suggestion # from the first strategy to provide one...
zsh/zsh-autosuggestions
src/fetch.zsh
Shell
mit
816
#--------------------------------------------------------------------# # Highlighting # #--------------------------------------------------------------------# # If there was a highlight, remove it _zsh_autosuggest_highlight_reset() { typeset -g _ZSH_AUTOSUGGEST_L...
zsh/zsh-autosuggestions
src/highlight.zsh
Shell
mit
896
#--------------------------------------------------------------------# # Start # #--------------------------------------------------------------------# # Start the autosuggestion widgets _zsh_autosuggest_start() { # By default we re-bind widgets on every p...
zsh/zsh-autosuggestions
src/start.zsh
Shell
mit
1,360
#--------------------------------------------------------------------# # Completion Suggestion Strategy # #--------------------------------------------------------------------# # Fetches a suggestion from the completion engine # _zsh_autosuggest_capture_postcompletion() { # Always...
zsh/zsh-autosuggestions
src/strategies/completion.zsh
Shell
mit
4,580
#--------------------------------------------------------------------# # History Suggestion Strategy # #--------------------------------------------------------------------# # Suggests the most recent history item that matches the given # prefix. # _zsh_autosuggest_strategy_hist...
zsh/zsh-autosuggestions
src/strategies/history.zsh
Shell
mit
1,239
#--------------------------------------------------------------------# # Match Previous Command Suggestion Strategy # #--------------------------------------------------------------------# # Suggests the most recent history item that matches the given # prefix and whose preceding history item a...
zsh/zsh-autosuggestions
src/strategies/match_prev_cmd.zsh
Shell
mit
2,313
#--------------------------------------------------------------------# # Utility Functions # #--------------------------------------------------------------------# _zsh_autosuggest_escape_command() { setopt localoptions EXTENDED_GLOB # Escape special chars in the st...
zsh/zsh-autosuggestions
src/util.zsh
Shell
mit
401
#--------------------------------------------------------------------# # Autosuggest Widget Implementations # #--------------------------------------------------------------------# # Disable suggestions _zsh_autosuggest_disable() { typeset -g _ZSH_AUTOSUGGEST_DISABLED _zsh_autosugges...
zsh/zsh-autosuggestions
src/widgets.zsh
Shell
mit
5,414
source ${0:A:h}/zsh-autosuggestions.zsh
zsh/zsh-autosuggestions
zsh-autosuggestions.plugin.zsh
Shell
mit
40
# Fish-like fast/unobtrusive autosuggestions for zsh. # https://github.com/zsh-users/zsh-autosuggestions # v0.7.0 # Copyright (c) 2013 Thiago de Arruda # Copyright (c) 2016-2021 Eric Freese # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation ...
zsh/zsh-autosuggestions
zsh-autosuggestions.zsh
Shell
mit
26,911
#!/bin/bash # Print the script usage print_usage() { echo -e "Usage: $0 [-n namespace] [-r release] [-L | -l app(s)] [-s since | -t timestamp ] [-m maxloglines] [-p] [-w log_timeout]\n" exit 1 } # Generic 'fail' function, report and exit fail() { echo -e "\nFAIL: $*\n" >&2 exit 1 } # Print error messages...
rzhu_projects/toolbox/kubesos
kubeSOS.sh
Shell
unknown
13,009
package io.devops def MavenBuild(){ container('maven'){ script { sh 'mvn package -DskipTests -Dmaven.javadoc.skip=true -Dmaven.site.skip=true -Dmaven.source.skip=true -Djacoco.skip=true -Dcheckstyle.skip=true -Dfindbugs.skip=true -Dpmd.skip=true -Dfabric8.skip=true -e -B' } } } ...
dogger/share-library
src/io/devops/build.groovy
Groovy
apache-2.0
1,223
package io.devops def DeployK8s(){ container("maven"){ writeFile file:'deploy-sample.yaml', text:libraryResource("deploy/yaml") sh "cat deploy-sample.yaml" withKubeConfig([credentialsId: "dev-kubeconfig"]){ sh "kubectl apply -f -" ...
dogger/share-library
src/io/devops/deploy.groovy
Groovy
apache-2.0
366
package io.devops; def getCode(srcUrl, branchName){ echo 'code init.....' checkout([$class: 'GitSCM', branches: [[name: "${branchName}"]], doGenerateSubmoduleConfigurations: false, extensions: [ [ $class: 'CloneOption', ...
dogger/share-library
src/io/devops/git.groovy
Groovy
apache-2.0
654
package io.devops def init(){ properties([ parameters([ string(defaultValue:'devops-java-sample', description:'应用名称', name: 'appName',trim: true, required: true ), string(defaultValue:'https://github.com/Feeeenng/devops-java-sample.git', description:'应用git地址', name: 'srcUrl',trim: t...
dogger/share-library
src/io/devops/params.groovy
Groovy
apache-2.0
710
package io.devops //格式化输出 def PrintMes(value,color){ colors = ['red' : "\033[40;31m >>>>>>>>>>>${value}<<<<<<<<<<< \033[0m", 'blue' : "\033[47;34m ${value} \033[0m", 'green' : ">>>>>>>>>>${value}>>>>>>>>>>", 'green1' : "\033[40;32m >>>>>>>>>>>${value}<<<<<<<<<...
dogger/share-library
src/io/devops/tools.groovy
Groovy
apache-2.0
408
package io.devops def MavenTest(){ container ('maven') { // 单元 测试 sh 'mvn clean -o -gs `pwd`/configuration/settings.xml test' } // 生成 测试报告 todo } def main(){ if("${buildType}" == 'java'){ MavenTest() }else { echo 'pass' } }
dogger/share-library
src/io/devops/unit.groovy
Groovy
apache-2.0
317
module.exports = { reactStrictMode: true, }
lpeng1991/qingyun
next.config.js
JavaScript
unknown
46
import '../styles/globals.css' function MyApp({ Component, pageProps }) { return <Component {...pageProps} /> } export default MyApp
lpeng1991/qingyun
pages/_app.js
JavaScript
unknown
137
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction export default function handler(req, res) { res.status(200).json({ name: 'John Doe' }) }
lpeng1991/qingyun
pages/api/hello.js
JavaScript
unknown
170
#!/var/lang/node12/bin/node const { nextStart } = require('next/dist/cli/next-start'); nextStart([ '--port', '9000', '--hostname', '0.0.0.0' ])
lpeng1991/qingyun
scf_bootstrap
JavaScript
unknown
145
.container { min-height: 100vh; padding: 0 0.5rem; display: flex; flex-direction: column; justify-content: center; align-items: center; height: 100vh; } .main { padding: 5rem 0; flex: 1; display: flex; flex-direction: column; justify-content: center; align-items: center; } .footer { width:...
lpeng1991/qingyun
styles/Home.module.css
CSS
unknown
1,808
html, body { padding: 0; margin: 0; font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; } a { color: inherit; text-decoration: none; } * { box-sizing: border-box; }
lpeng1991/qingyun
styles/globals.css
CSS
unknown
275
pub mod sort; pub use sort::*;
rickiey/rs
src/algorithm/mod.rs
Rust
unknown
32
pub fn sort_bin() { let mut rse:Vec<i32> = vec![2,5,7,8,1,2,7,3,8,6,-1]; let mut v2 :Vec<i32> = vec![7,7,3,2,6]; println!("{:?}", rse.append(&mut v2)) }
rickiey/rs
src/algorithm/sort/binary.rs
Rust
unknown
166
pub mod binary; pub mod quick;
rickiey/rs
src/algorithm/sort/mod.rs
Rust
unknown
31
pub fn use_quick_sort(){ let mut rse:Vec<i32> = vec![2,5,7,8,1,2,7,3,8,6,-1]; quick_sort(&mut rse); println!("{:?}", rse) } pub fn quick_sort<T: Ord>(arr: &mut [T]) { let len = arr.len(); _quick_sort(arr, 0, (len - 1) as isize); } fn _quick_sort<T: Ord>(arr: &mut [T], low: isize, high: isize) ...
rickiey/rs
src/algorithm/sort/quick.rs
Rust
unknown
1,135
use std::collections::HashMap; pub fn use_vec() { let v = vec![1, 23, 4]; for i in v.iter() { println!("{}", i); } let mut vv: Vec<&str> = vec!["a", "b", "c"]; vv[2] = "vvvv"; println!( "{:?} {}", match vv.get(3) { None => "", _ => vv.get(3).unwr...
rickiey/rs
src/collections/coll.rs
Rust
unknown
1,231
pub mod coll;
rickiey/rs
src/collections/mod.rs
Rust
unknown
14
#[derive(Debug)] pub enum IpAddrKid { Loop, V4(String), V6(String), } impl IpAddrKid { pub fn print_ip(self) { match self { IpAddrKid::V4(s4) => { println!("{:?}", s4); } IpAddrKid::V6(s6) => { println!("{:?}", s6); ...
rickiey/rs
src/enume/enumerate.rs
Rust
unknown
1,567
pub mod enumerate; pub fn super_fn() { println!("super fn"); }
rickiey/rs
src/enume/mod.rs
Rust
unknown
68
extern crate serde; extern crate serde_json; use serde_json::Value as jsonValue; #[derive(Serialize, Deserialize, Debug)] pub struct Res { #[serde(rename(serialize = "code", deserialize = "code"))] Code: String, } pub fn use_serde_json() { let json_raw = r#"{"code":"ok"}"#; let res: jsonValue = ser...
rickiey/rs
src/extern_lib/json_parse.rs
Rust
unknown
665
pub mod json_parse; pub mod req;
rickiey/rs
src/extern_lib/mod.rs
Rust
unknown
33
extern crate reqwest; use std::error; // use reqwest; pub fn use_reqwest() -> Result<i32, reqwest::Error> { // let b = blocking::get("http://localhost:9090/").text(); // // println!("{:?}", b); // let body = reqwest::blocking::get("http://localhost:9090/")?.text()?; let resp = reqwest::blockin...
rickiey/rs
src/extern_lib/req.rs
Rust
unknown
420
pub mod print_std;
rickiey/rs
src/fmt_print/mod.rs
Rust
unknown
19
pub fn prints() { println!("{0} {a1}", "args02", a1 = "args01"); let s = "2".parse::<f64>().unwrap(); println!("{} {1}", 3.to_string(), s); println!("{} {:?}", "args02", "args01".to_string()); println!("{number:>width$}", number = 1, width = 6); println!("{number:0>w$}", number = 1, w = 6); }
rickiey/rs
src/fmt_print/print_std.rs
Rust
unknown
318
pub fn test_001() { println!("{}", max_area(vec![2, 5, 1, 6, 7, 3, 8])) } /* 给你 n 个非负整数 a1,a2,...,an,每个数代表坐标中的一个点 (i, ai) 。在坐标内画 n 条垂直线,垂直线 i 的两个端点分别为 (i, ai) 和 (i, 0) 。找出其中的两条线,使得它们与 x 轴共同构成的容器可以容纳最多的水。 说明:你不能倾斜容器。 示例 1: 输入:[1,8,6,2,5,4,8,3,7] 输出:49 解释:图中垂直线代表输入数组 [1,8,6,2,5,4,8,3,7]。在此情况下,容器能够容纳水(表示为蓝色部分)...
rickiey/rs
src/leet_code/container_moster_water.rs
Rust
unknown
1,383
pub mod container_moster_water;
rickiey/rs
src/leet_code/mod.rs
Rust
unknown
32
mod algorithm; mod collections; mod enume; mod extern_lib; mod fmt_print; mod leet_code; mod mysqlcli; mod strt; mod struct_trait; #[macro_use] extern crate serde_derive; use crate::algorithm::sort; #[warn(unused_imports)] use crate::strt::sstring::*; use collections::coll; use fmt_print::print_std::prints as ps; use...
rickiey/rs
src/main.rs
Rust
unknown
2,307
pub mod mycli;
rickiey/rs
src/mysqlcli/mod.rs
Rust
unknown
15
use std::str::FromStr; use chrono::prelude::*; use mysql::prelude::*; use mysql::*; use crate::fmt_print::print_std; // 用来处理日期 /* CREATE TABLE `penalty_msg` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `height` bigint(20) unsigned NOT NULL, `from_addr` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL DE...
rickiey/rs
src/mysqlcli/mycli.rs
Rust
unknown
5,089
pub mod sstring;
rickiey/rs
src/strt/mod.rs
Rust
unknown
17
pub fn sts() { create_str() } fn create_str() { let mut s1 = "s1".to_string(); let s2 = String::from("s2"); let mut s3 = String::new(); s3.push('s'); s3.push_str("3"); s1 = s1 + &s2; println!("{} {} {}", s1, s2, s3); let mut my_name = "Pascal".to_string(); my_name.push_str(" P...
rickiey/rs
src/strt/sstring.rs
Rust
unknown
972
pub mod strait;
rickiey/rs
src/struct_trait/mod.rs
Rust
unknown
16
use std::fmt; // 导入 `fmt` // use typename::TypeName; // 带有两个数字的结构体。推导出 `Debug`,以便与 `Display` 的输出进行比较。 #[derive(Debug,Eq,Clone,Copy,Hash,Ord, PartialOrd, PartialEq)] pub struct MinMax(pub i64, pub i64); // 实现 `MinMax` 的 `Display`。 impl fmt::Display for MinMax { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result ...
rickiey/rs
src/struct_trait/strait.rs
Rust
unknown
2,221
# You can put files here to add functionality separated per file, which # will be ignored by git. # Files on the custom/ directory will be automatically loaded by the init # script, in alphabetical order. # For example: add yourself some shortcuts to projects you often work on. # # brainstormr=~/Projects/development/p...
zsh/ohmyzsh
custom/example.zsh
Shell
mit
363
# Add your own custom plugins in the custom/plugins directory. Plugins placed # here will override ones with the same name in the main plugins directory.
zsh/ohmyzsh
custom/plugins/example/example.plugin.zsh
Shell
mit
154
# Put your custom themes in this folder. # Example: PROMPT="%{$fg[red]%}%n%{$reset_color%}@%{$fg[blue]%}%m %{$fg[yellow]%}%~ %{$reset_color%}%% "
zsh/ohmyzsh
custom/themes/example.zsh-theme
Shell
mit
147
## Bazaar integration ## Just works with the GIT integration just add $(bzr_prompt_info) to the PROMPT function bzr_prompt_info() { BZR_CB=`bzr nick 2> /dev/null | grep -v "ERROR" | cut -d ":" -f2 | awk -F / '{print "bzr::"$1}'` if [ -n "$BZR_CB" ]; then BZR_DIRTY="" [[ -n `bzr status` ]] && BZR_DIRTY=" %{$fg[red...
zsh/ohmyzsh
lib/bzr.zsh
Shell
mit
430
#!/usr/bin/env zsh function omz { [[ $# -gt 0 ]] || { _omz::help return 1 } local command="$1" shift # Subcommand functions start with _ so that they don't # appear as completion entries when looking for `omz` (( $+functions[_omz::$command] )) || { _omz::help return 1 } _omz::$comm...
zsh/ohmyzsh
lib/cli.zsh
Shell
mit
22,566
# System clipboard integration # # This file has support for doing system clipboard copy and paste operations # from the command line in a generic cross-platform fashion. # # This is uses essentially the same heuristic as neovim, with the additional # special support for Cygwin. # See: https://github.com/neovim/neovim/...
zsh/ohmyzsh
lib/clipboard.zsh
Shell
mit
4,236
# Handle completions insecurities (i.e., completion-dependent directories with # insecure ownership or permissions) by: # # * Human-readably notifying the user of these insecurities. function handle_completion_insecurities() { # List of the absolute paths of all unique insecure directories, split on # newline from ...
zsh/ohmyzsh
lib/compfix.zsh
Shell
mit
1,822
# fixme - the load process here seems a bit bizarre zmodload -i zsh/complist WORDCHARS='' unsetopt menu_complete # do not autoselect the first completion entry unsetopt flowcontrol setopt auto_menu # show completion menu on successive tab press setopt complete_in_word setopt always_to_end # should this be ...
zsh/ohmyzsh
lib/completion.zsh
Shell
mit
3,126
if [[ "$ENABLE_CORRECTION" == "true" ]]; then alias cp='nocorrect cp' alias ebuild='nocorrect ebuild' alias gist='nocorrect gist' alias heroku='nocorrect heroku' alias hpodder='nocorrect hpodder' alias man='nocorrect man' alias mkdir='nocorrect mkdir' alias mv='nocorrect mv' alias mysql='nocorrect mys...
zsh/ohmyzsh
lib/correction.zsh
Shell
mit
405
# diagnostics.zsh # # Diagnostic and debugging support for oh-my-zsh # omz_diagnostic_dump() # # Author: Andrew Janke <andrew@apjanke.net> # # Usage: # # omz_diagnostic_dump [-v] [-V] [file] # # NOTE: This is a work in progress. Its interface and behavior are going to change, # and probably in non-back-compatible ways...
zsh/ohmyzsh
lib/diagnostics.zsh
Shell
mit
11,718
# Changing/making/removing directory setopt auto_pushd setopt pushd_ignore_dups setopt pushdminus alias -g ...='../..' alias -g ....='../../..' alias -g .....='../../../..' alias -g ......='../../../../..' alias -- -='cd -' alias 1='cd -1' alias 2='cd -2' alias 3='cd -3' alias 4='cd -4' alias 5='cd -5' alias 6='cd -6...
zsh/ohmyzsh
lib/directories.zsh
Shell
mit
617
function zsh_stats() { fc -l 1 \ | awk '{ CMD[$2]++; count++; } END { for (a in CMD) print CMD[a] " " CMD[a]*100/count "% " a }' \ | grep -v "./" | sort -nr | head -n 20 | column -c3 -s " " -t | nl } function uninstall_oh_my_zsh() { env ZSH="$ZSH" sh "$ZSH/tools/uninstall.sh" } function upgrade_oh_my_zsh(...
zsh/ohmyzsh
lib/functions.zsh
Shell
mit
6,777
# The git prompt's git commands are read-only and should not interfere with # other processes. This environment variable is equivalent to running with `git # --no-optional-locks`, but falls back gracefully for older versions of git. # See git(1) for and git-status(1) for a description of that flag. # # We wrap in a loc...
zsh/ohmyzsh
lib/git.zsh
Shell
mit
10,308
__GREP_CACHE_FILE="$ZSH_CACHE_DIR"/grep-alias # See if there's a cache file modified in the last day __GREP_ALIAS_CACHES=("$__GREP_CACHE_FILE"(Nm-1)) if [[ -n "$__GREP_ALIAS_CACHES" ]]; then source "$__GREP_CACHE_FILE" else grep-flags-available() { command grep "$@" "" &>/dev/null <<< "" } # I...
zsh/ohmyzsh
lib/grep.zsh
Shell
mit
1,467
## History wrapper function omz_history { local clear list zparseopts -E c=clear l=list if [[ -n "$clear" ]]; then # if -c provided, clobber the history file echo -n >| "$HISTFILE" fc -p "$HISTFILE" echo >&2 History file deleted. elif [[ -n "$list" ]]; then # if -l provided, run as if calli...
zsh/ohmyzsh
lib/history.zsh
Shell
mit
1,478
# http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html # http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Zle-Builtins # http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Standard-Widgets # Make sure that the terminal is in application mode when zle is active, since # only then values from ...
zsh/ohmyzsh
lib/key-bindings.zsh
Shell
mit
4,899
autoload -Uz is-at-least # *-magic is known buggy in some versions; disable if so if [[ $DISABLE_MAGIC_FUNCTIONS != true ]]; then for d in $fpath; do if [[ -e "$d/url-quote-magic" ]]; then if is-at-least 5.1; then autoload -Uz bracketed-paste-magic zle -N bracketed-paste bracketed-paste-mag...
zsh/ohmyzsh
lib/misc.zsh
Shell
mit
746
# get the nvm-controlled node.js version function nvm_prompt_info() { which nvm &>/dev/null || return local nvm_prompt=${$(nvm current)#v} echo "${ZSH_THEME_NVM_PROMPT_PREFIX}${nvm_prompt:gs/%/%%}${ZSH_THEME_NVM_PROMPT_SUFFIX}" }
zsh/ohmyzsh
lib/nvm.zsh
Shell
mit
236
# *_prompt_info functions for usage in your prompt # # Plugin creators, please add your *_prompt_info function to the list # of dummy implementations to help theme creators not receiving errors # without the need of implementing conditional clauses. # # See also lib/bzr.zsh, lib/git.zsh and lib/nvm.zsh for # git_prompt...
zsh/ohmyzsh
lib/prompt_info_functions.zsh
Shell
mit
1,432
# A script to make using 256 colors in zsh less painful. # P.C. Shyamshankar <sykora@lucentbeing.com> # Copied from https://github.com/sykora/etc/blob/master/zsh/functions/spectrum/ typeset -AHg FX FG BG FX=( reset "%{%}" bold "%{%}" no-bold "%{%}" italic "%{%}" no-italic ...
zsh/ohmyzsh
lib/spectrum.zsh
Shell
mit
1,231
# Set terminal window and tab/icon title # # usage: title short_tab_title [long_window_title] # # See: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 # Fully supports screen, iterm, and probably most modern xterm and rxvt # (In screen, only short_tab_title is used) # Limited support for Apple Terminal (Term...
zsh/ohmyzsh
lib/termsupport.zsh
Shell
mit
4,815
# ls colors autoload -U colors && colors # Enable ls colors export LSCOLORS="Gxfxcxdxbxegedabagacad" # TODO organise this chaotic logic if [[ "$DISABLE_LS_COLORS" != "true" ]]; then # Find the option for using colors in ls, depending on the version if [[ "$OSTYPE" == netbsd* ]]; then # On NetBSD, test if "gl...
zsh/ohmyzsh
lib/theme-and-appearance.zsh
Shell
mit
2,563
# Impacted versions go from v5.0.3 to v5.8 (v5.8.1 is the first patched version) autoload -Uz is-at-least if is-at-least 5.8.1 || ! is-at-least 5.0.3; then return fi # Quote necessary $hook_com[<field>] items just before they are used # in the line "VCS_INFO_hook 'post-backend'" of the VCS_INFO_formats # function, w...
zsh/ohmyzsh
lib/vcs_info.zsh
Shell
mit
2,322
# Protect against non-zsh execution of Oh My Zsh (use POSIX syntax here) [ -n "$ZSH_VERSION" ] || { # ANSI formatting function (\033[<code>m) # 0: reset, 1: bold, 4: underline, 22: no bold, 24: no underline, 31: red, 33: yellow omz_f() { [ $# -gt 0 ] || return IFS=";" printf "\033[%sm" $* } # If stdou...
zsh/ohmyzsh
oh-my-zsh.sh
Shell
mit
5,927
if (( ${+commands[op]} )); then eval "$(op completion zsh)" compdef _op op fi # opswd puts the password of the named service into the clipboard. If there's a # one time password, it will be copied into the clipboard after 10 seconds. The # clipboard is cleared after another 20 seconds. function opswd() { if [[ $...
zsh/ohmyzsh
plugins/1password/1password.plugin.zsh
Shell
mit
1,339
alias-finder() { local cmd="" exact="" longer="" wordStart="" wordEnd="" multiWordEnd="" for i in $@; do case $i in -e|--exact) exact=true;; -l|--longer) longer=true;; *) if [[ -z $cmd ]]; then cmd=$i else cmd="$cmd $i" fi ;; esac done ...
zsh/ohmyzsh
plugins/alias-finder/alias-finder.plugin.zsh
Shell
mit
1,114
# with lots of 3rd-party amazing aliases installed, just need something to explore it quickly. # # - acs: alias cheatsheet # group alias by command, pass addition argv to grep. function acs(){ (( $+commands[python] )) || { echo "[error] No python executable detected" return } alias | python ${functions_...
zsh/ohmyzsh
plugins/aliases/aliases.plugin.zsh
Shell
mit
353
#!/usr/bin/env python import sys import itertools import termcolor def parse(line): left = line[0:line.find('=')].strip() right = line[line.find('=')+1:].strip('\'"\n ') try: cmd = next(part for part in right.split() if len([char for char in '=<>' if char in part])==0) except StopIteration: ...
zsh/ohmyzsh
plugins/aliases/cheatsheet.py
Python
mit
2,255
# coding: utf-8 # Copyright (c) 2008-2011 Volvox Development Team # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy...
zsh/ohmyzsh
plugins/aliases/termcolor.py
Python
mit
5,043
# Functions function ansible-version(){ ansible --version } function ansible-role-init(){ if ! [ -z $1 ] ; then echo "Ansible Role : $1 Creating...." ansible-galaxy init $1 tree $1 else echo "Usage : ansible-role-init <role name>" echo "Example : ansible-role-init ro...
zsh/ohmyzsh
plugins/ansible/ansible.plugin.zsh
Shell
mit
662
# Default to colored output export ANT_ARGS='-logger org.apache.tools.ant.listener.AnsiColorLogger'
zsh/ohmyzsh
plugins/ant/ant.plugin.zsh
Shell
mit
100
# commands to control local apache2 server installation # paths are for osx installation via macports alias apache2start='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start' alias apache2stop='sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop' alias apache2restart='s...
zsh/ohmyzsh
plugins/apache2-macports/apache2-macports.plugin.zsh
Shell
mit
399
# # Aliases # (sorted alphabetically) # alias ara='arc amend' alias arb='arc branch' alias arbl='arc bland' alias arco='arc cover' alias arci='arc commit' alias ard='arc diff' alias ardc='arc diff --create' alias ardnu='arc diff --nounit' alias ardnupc='arc diff --nounit --plan-changes' alias ardpc='arc diff --plan-c...
zsh/ohmyzsh
plugins/arcanist/arcanist.plugin.zsh
Shell
mit
816
####################################### # Pacman # ####################################### # Pacman - https://wiki.archlinux.org/index.php/Pacman_Tips alias pacupg='sudo pacman -Syu' alias pacin='sudo pacman -S' alias paclean='sudo pacman -Sc' alias pacins='sudo pacman -U' alias paclr='sud...
zsh/ohmyzsh
plugins/archlinux/archlinux.plugin.zsh
Shell
mit
5,152
# Find where asdf should be installed ASDF_DIR="${ASDF_DIR:-$HOME/.asdf}" ASDF_COMPLETIONS="$ASDF_DIR/completions" # If not found, check for archlinux/AUR package (/opt/asdf-vm/) if [[ ! -f "$ASDF_DIR/asdf.sh" || ! -f "$ASDF_COMPLETIONS/asdf.bash" ]] && [[ -f "/opt/asdf-vm/asdf.sh" ]]; then ASDF_DIR="/opt/asdf-vm" ...
zsh/ohmyzsh
plugins/asdf/asdf.plugin.zsh
Shell
mit
850
# Initialization: activate autoenv or report its absence () { local d autoenv_dir install_locations if ! type autoenv_init >/dev/null; then # Check if activate.sh is in $PATH if (( $+commands[activate.sh] )); then autoenv_dir="${commands[activate.sh]:h}" fi # Locate autoenv installation if [[ -z $autoenv...
zsh/ohmyzsh
plugins/autoenv/autoenv.plugin.zsh
Shell
mit
1,797
declare -a autojump_paths autojump_paths=( $HOME/.autojump/etc/profile.d/autojump.zsh # manual installation $HOME/.autojump/share/autojump/autojump.zsh # manual installation $HOME/.nix-profile/etc/profile.d/autojump.sh # NixOS installation /run/current-system/sw/share/autojump/autojump.zsh ...
zsh/ohmyzsh
plugins/autojump/autojump.plugin.zsh
Shell
mit
1,402
function agp() { echo $AWS_PROFILE } # AWS profile selection function asp() { if [[ -z "$1" ]]; then unset AWS_DEFAULT_PROFILE AWS_PROFILE AWS_EB_PROFILE echo AWS profile cleared. return fi local -a available_profiles available_profiles=($(aws_profiles)) if [[ -z "${available_profiles[(r)$1]}"...
zsh/ohmyzsh
plugins/aws/aws.plugin.zsh
Shell
mit
7,300
########################################### # Battery plugin for oh-my-zsh # # Original Author: Peter hoeg (peterhoeg) # # Email: peter@speartail.com # ########################################### # Author: Sean Jones (neuralsandwich) # # Email: neuralsandwich@gmail.com # # Modified t...
zsh/ohmyzsh
plugins/battery/battery.plugin.zsh
Shell
mit
8,227
alias bbpb='pbpaste | bbedit --clean --view-top' alias bbd=bbdiff # # If the bb command is called without an argument, launch BBEdit # If bb is passed a directory, cd to it and open it in BBEdit # If bb is passed a file, open it in BBEdit # function bb() { if [[ -z "$1" ]] then bbedit --launch els...
zsh/ohmyzsh
plugins/bbedit/bbedit.plugin.zsh
Shell
mit
420
#!/usr/bin/env zsh ## setup ## [[ -o interactive ]] || return #interactive only! zmodload zsh/datetime || { print "can't load zsh/datetime"; return } # faster than date() autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return } (( ${+bgnotify_threshold} )) || bgnotify_threshold=5 #default 10 seconds ##...
zsh/ohmyzsh
plugins/bgnotify/bgnotify.plugin.zsh
Shell
mit
3,096
alias bi="bower install" alias bisd="bower install --save-dev" alias bis="bower install --save" alias bl="bower list" alias bs="bower search" _bower_installed_packages () { bower_package_list=$(bower ls --no-color 2>/dev/null| awk 'NR>3{print p}{p=$0}'| cut -d ' ' -f 2|sed 's/#.*//') } _bower () { local -a _1s...
zsh/ohmyzsh
plugins/bower/bower.plugin.zsh
Shell
mit
2,418
# Branch: displays the current Git or Mercurial branch fast. # Victor Torres <vpaivatorres@gmail.com> # Oct 2, 2015 function branch_prompt_info() { # Start checking in current working directory local branch="" dir="$PWD" while [[ "$dir" != '/' ]]; do # Found .git directory if [[ -d "${dir}/.git" ]]; then...
zsh/ohmyzsh
plugins/branch/branch.plugin.zsh
Shell
mit
859
alias brewp='brew pin' alias brewsp='brew list --pinned' alias bubo='brew update && brew outdated' alias bubc='brew upgrade && brew cleanup' alias bubu='bubo && bubc' alias buf='brew upgrade --formula' alias bcubo='brew update && brew outdated --cask' alias bcubc='brew upgrade --cask && brew cleanup' function brews() ...
zsh/ohmyzsh
plugins/brew/brew.plugin.zsh
Shell
mit
694
## Aliases alias ba="bundle add" alias bck="bundle check" alias bcn="bundle clean" alias be="bundle exec" alias bi="bundle_install" alias bl="bundle list" alias bo="bundle open" alias bout="bundle outdated" alias bp="bundle package" alias bu="bundle update" ## Functions bundle_install() { # Bail out if bundler is ...
zsh/ohmyzsh
plugins/bundler/bundler.plugin.zsh
Shell
mit
2,580