From 0f4d6a5056d458e04d11c046820e5d17f65c161e Mon Sep 17 00:00:00 2001 From: Thomas Date: Mon, 26 Sep 2016 16:40:07 +0200 Subject: [PATCH 1/6] Add a tip to ease agnoster first setup --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6da73189..268c1b39 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,9 @@ ZSH_THEME="robbyrussell" To use a different theme, simply change the value to match the name of your desired theme. For example: ```shell -ZSH_THEME="agnoster" # (this is one of the fancy ones) +ZSH_THEME="agnoster" # (this is one of the fancy ones ; + # you might need to install a specific font on your console's host for this to work ; + # see https://github.com/powerline/fonts/tree/master/DejaVuSansMono) ``` Open up a new terminal window and your prompt should look something like... From 37bf9186a03a4e15dcccd1da76b9c6f597cc8e71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 25 Oct 2016 05:43:11 +0200 Subject: [PATCH 2/6] Update docker completion (2015-10-25) Closes #5568 Source: https://github.com/docker/docker/commit/c9fdf9abf8d6443598808809b900d96e04adfcb1 --- plugins/docker/_docker | 53 ++++++++++++++++++++++++++++-------------- 1 file changed, 36 insertions(+), 17 deletions(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 1366fd61..415e731f 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -57,7 +57,7 @@ __docker_get_containers() { type=$1; shift [[ $kind = (stopped|all) ]] && args=($args -a) - lines=(${(f)"$(_call_program commands docker $docker_options ps --format 'table' --no-trunc $args)"}) + lines=(${(f)${:-"$(_call_program commands docker $docker_options ps --format 'table' --no-trunc $args)"$'\n'}}) # Parse header line to find columns local i=1 j=1 k header=${lines[1]} @@ -153,7 +153,7 @@ __docker_images() { [[ $PREFIX = -* ]] && return 1 integer ret=1 declare -a images - images=(${${${(f)"$(_call_program commands docker $docker_options images)"}[2,-1]}/(#b)([^ ]##) ##([^ ]##) ##([^ ]##)*/${match[3]}:${(r:15:: :::)match[2]} in ${match[1]}}) + images=(${${${(f)${:-"$(_call_program commands docker $docker_options images)"$'\n'}}[2,-1]}/(#b)([^ ]##) ##([^ ]##) ##([^ ]##)*/${match[3]}:${(r:15:: :::)match[2]} in ${match[1]}}) _describe -t docker-images "images" images && ret=0 __docker_repositories_with_tags && ret=0 return ret @@ -162,7 +162,7 @@ __docker_images() { __docker_repositories() { [[ $PREFIX = -* ]] && return 1 declare -a repos - repos=(${${${(f)"$(_call_program commands docker $docker_options images)"}%% *}[2,-1]}) + repos=(${${${(f)${:-"$(_call_program commands docker $docker_options images)"$'\n'}}%% *}[2,-1]}) repos=(${repos#}) _describe -t docker-repos "repositories" repos } @@ -172,7 +172,7 @@ __docker_repositories_with_tags() { integer ret=1 declare -a repos onlyrepos matched declare m - repos=(${${${${(f)"$(_call_program commands docker $docker_options images)"}[2,-1]}/ ##/:::}%% *}) + repos=(${${${${(f)${:-"$(_call_program commands docker $docker_options images)"$'\n'}}[2,-1]}/ ##/:::}%% *}) repos=(${${repos%:::}#}) # Check if we have a prefix-match for the current prefix. onlyrepos=(${repos%::*}) @@ -208,7 +208,7 @@ __docker_search() { if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \ && ! _retrieve_cache ${cachename#_}; then _message "Searching for ${searchterm}..." - result=(${${${(f)"$(_call_program commands docker $docker_options search $searchterm)"}%% *}[2,-1]}) + result=(${${${(f)${:-"$(_call_program commands docker $docker_options search $searchterm)"$'\n'}}%% *}[2,-1]}) _store_cache ${cachename#_} result fi _wanted dockersearch expl 'available images' compadd -a result @@ -219,7 +219,7 @@ __docker_get_log_options() { integer ret=1 local log_driver=${opt_args[--log-driver]:-"all"} - local -a awslogs_options fluentd_options gelf_options journald_options json_file_options syslog_options splunk_options + local -a awslogs_options fluentd_options gelf_options journald_options json_file_options logentries_options syslog_options splunk_options awslogs_options=("awslogs-region" "awslogs-group" "awslogs-stream") fluentd_options=("env" "fluentd-address" "fluentd-async-connect" "fluentd-buffer-limit" "fluentd-retry-wait" "fluentd-max-retries" "labels" "tag") @@ -227,6 +227,7 @@ __docker_get_log_options() { gelf_options=("env" "gelf-address" "gelf-compression-level" "gelf-compression-type" "labels" "tag") journald_options=("env" "labels" "tag") json_file_options=("env" "labels" "max-file" "max-size") + logentries_options=("logentries-token") syslog_options=("env" "labels" "syslog-address" "syslog-facility" "syslog-format" "syslog-tls-ca-cert" "syslog-tls-cert" "syslog-tls-key" "syslog-tls-skip-verify" "tag") splunk_options=("env" "labels" "splunk-caname" "splunk-capath" "splunk-format" "splunk-gzip" "splunk-gzip-level" "splunk-index" "splunk-insecureskipverify" "splunk-source" "splunk-sourcetype" "splunk-token" "splunk-url" "splunk-verify-connection" "tag") @@ -236,6 +237,7 @@ __docker_get_log_options() { [[ $log_driver = (gelf|all) ]] && _describe -t gelf-options "gelf options" gelf_options "$@" && ret=0 [[ $log_driver = (journald|all) ]] && _describe -t journald-options "journald options" journald_options "$@" && ret=0 [[ $log_driver = (json-file|all) ]] && _describe -t json-file-options "json-file options" json_file_options "$@" && ret=0 + [[ $log_driver = (logentries|all) ]] && _describe -t logentries-options "logentries options" logentries_options "$@" && ret=0 [[ $log_driver = (syslog|all) ]] && _describe -t syslog-options "syslog options" syslog_options "$@" && ret=0 [[ $log_driver = (splunk|all) ]] && _describe -t splunk-options "splunk options" splunk_options "$@" && ret=0 @@ -333,6 +335,9 @@ __docker_complete_ps_filters() { (id) __docker_containers_ids && ret=0 ;; + (is-task) + _describe -t boolean-filter-opts "filter options" boolean_opts && ret=0 + ;; (name) __docker_containers_names && ret=0 ;; @@ -504,7 +509,7 @@ __docker_get_networks() { type=$1; shift - lines=(${(f)"$(_call_program commands docker $docker_options network ls)"}) + lines=(${(f)${:-"$(_call_program commands docker $docker_options network ls)"$'\n'}}) # Parse header line to find columns local i=1 j=1 k header=${lines[1]} @@ -720,7 +725,7 @@ __docker_nodes() { filter=$1; shift [[ $filter != "none" ]] && args=("-f $filter") - lines=(${(f)"$(_call_program commands docker $docker_options node ls $args)"}) + lines=(${(f)${:-"$(_call_program commands docker $docker_options node ls $args)"$'\n'}}) # Parse header line to find columns local i=1 j=1 k header=${lines[1]} declare -A begin end @@ -792,7 +797,7 @@ __docker_node_commands() { "ls:List nodes in the swarm" "promote:Promote a node as manager in the swarm" "rm:Remove one or more nodes from the swarm" - "ps:List tasks running on a node, defaults to current node" + "ps:List tasks running on one or more nodes, defaults to current node" "update:Update a node" ) _describe -t docker-node-commands "docker node command" _docker_node_subcommands @@ -847,7 +852,7 @@ __docker_node_subcommand() { "($help)*"{-f=,--filter=}"[Provide filter values]:filter:->filter-options" \ "($help)--no-resolve[Do not map IDs to Names]" \ "($help)--no-trunc[Do not truncate output]" \ - "($help -)1:node:__docker_complete_nodes" && ret=0 + "($help -)*:node:__docker_complete_nodes" && ret=0 case $state in (filter-options) __docker_node_complete_ps_filters && ret=0 @@ -881,7 +886,7 @@ __docker_complete_plugins() { local line s declare -a lines plugins - lines=(${(f)"$(_call_program commands docker $docker_options plugin ls)"}) + lines=(${(f)${:-"$(_call_program commands docker $docker_options plugin ls)"$'\n'}}) # Parse header line to find columns local i=1 j=1 k header=${lines[1]} @@ -1007,7 +1012,7 @@ __docker_services() { type=$1; shift - lines=(${(f)"$(_call_program commands docker $docker_options service ls)"}) + lines=(${(f)${:-"$(_call_program commands docker $docker_options service ls)"$'\n'}}) # Parse header line to find columns local i=1 j=1 k header=${lines[1]} @@ -1103,6 +1108,8 @@ __docker_service_subcommand() { "($help)--stop-grace-period=[Time to wait before force killing a container]:grace period: " "($help)--update-delay=[Delay between updates]:delay: " "($help)--update-failure-action=[Action on update failure]:mode:(pause continue)" + "($help)--update-max-failure-ratio=[Failure rate to tolerate during an update]:fraction: " + "($help)--update-monitor=[Duration after each task update to monitor for failure]:window: " "($help)--update-parallelism=[Maximum number of tasks updated simultaneously]:number: " "($help -u --user)"{-u=,--user=}"[Username or UID]:user:_users" "($help)--with-registry-auth[Send registry authentication details to swarm agents]" @@ -1178,8 +1185,10 @@ __docker_service_subcommand() { "($help)--arg=[Service command args]:arguments: _normal" \ "($help)*--container-label-add=[Add or update container labels]:label: " \ "($help)*--container-label-rm=[Remove a container label by its key]:label: " \ + "($help)--force[Force update]" \ "($help)*--group-rm=[Remove previously added user groups from the container]:group:_groups" \ "($help)--image=[Service image tag]:image:__docker_repositories" \ + "($help)--rollback[Rollback to previous specification]" \ "($help -)1:service:__docker_complete_services" && ret=0 ;; (help) @@ -1293,7 +1302,7 @@ __docker_volumes() { integer ret=1 declare -a lines volumes - lines=(${(f)"$(_call_program commands docker $docker_options volume ls)"}) + lines=(${(f)${:-"$(_call_program commands docker $docker_options volume ls)"$'\n'}}) # Parse header line to find columns local i=1 j=1 k header=${lines[1]} @@ -1506,6 +1515,7 @@ __docker_subcommand() { $opts_build_create_run \ $opts_build_create_run_update \ "($help)*--build-arg[Build-time variables]:=: " \ + "($help)--compress[Compress the build context using gzip]" \ "($help -f --file)"{-f=,--file=}"[Name of the Dockerfile]:Dockerfile:_files" \ "($help)--force-rm[Always remove intermediate containers]" \ "($help)*--label=[Set metadata for an image]:label=value: " \ @@ -1594,6 +1604,7 @@ __docker_subcommand() { "($help -g --graph)"{-g=,--graph=}"[Root of the Docker runtime]:path:_directories" \ "($help -H --host)"{-H=,--host=}"[tcp://host:port to bind/connect to]:host: " \ "($help)--icc[Enable inter-container communication]" \ + "($help)--init-path=[Path to the docker-init binary]:docker-init binary:_files" \ "($help)*--insecure-registry=[Enable insecure registry communication]:registry: " \ "($help)--ip=[Default IP when binding container ports]" \ "($help)--ip-forward[Enable net.ipv4.ip_forward]" \ @@ -1669,6 +1680,7 @@ __docker_subcommand() { $opts_help \ $opts_attach_exec_run_start \ "($help -d --detach)"{-d,--detach}"[Detached mode: leave the container running in the background]" \ + "($help -e --env)"{-e,--env}"[Set environment variables]" \ "($help -i --interactive)"{-i,--interactive}"[Keep stdin open even if not attached]" \ "($help)--privileged[Give extended Linux capabilities to the command]" \ "($help -t --tty)"{-t,--tty}"[Allocate a pseudo-tty]" \ @@ -1704,7 +1716,7 @@ __docker_subcommand() { "($help -a --all)"{-a,--all}"[Show all images]" \ "($help)--digests[Show digests]" \ "($help)*"{-f=,--filter=}"[Filter values]:filter:->filter-options" \ - "($help)--format[Pretty-print images using a Go template]:template: " \ + "($help)--format=[Pretty-print images using a Go template]:template: " \ "($help)--no-trunc[Do not truncate output]" \ "($help -q --quiet)"{-q,--quiet}"[Only show numeric IDs]" \ "($help -): :__docker_repositories" && ret=0 @@ -1726,7 +1738,7 @@ __docker_subcommand() { (info|version) _arguments $(__docker_arguments) \ $opts_help \ - "($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " && ret=0 + "($help -f --format)"{-f=,--format=}"[Format the output using the given go template]:template: " && ret=0 ;; (inspect) local state @@ -1851,7 +1863,7 @@ __docker_subcommand() { "($help -a --all)"{-a,--all}"[Show all containers]" \ "($help)--before=[Show only container created before...]:containers:__docker_containers" \ "($help)*"{-f=,--filter=}"[Filter values]:filter:__docker_complete_ps_filters" \ - "($help)--format[Pretty-print containers using a Go template]:template: " \ + "($help)--format=[Pretty-print containers using a Go template]:template: " \ "($help -l --latest)"{-l,--latest}"[Show only the latest created container]" \ "($help -n --last)"{-n=,--last=}"[Show n last created containers (includes all states)]:n:(1 5 10 25 50)" \ "($help)--no-trunc[Do not truncate output]" \ @@ -1878,12 +1890,18 @@ __docker_subcommand() { "($help -):old name:__docker_containers" \ "($help -):new name: " && ret=0 ;; - (restart|stop) + (stop) _arguments $(__docker_arguments) \ $opts_help \ "($help -t --time)"{-t=,--time=}"[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)" \ "($help -)*:containers:__docker_runningcontainers" && ret=0 ;; + (restart) + _arguments $(__docker_arguments) \ + $opts_help \ + "($help -t --time)"{-t=,--time=}"[Number of seconds to try to stop for before killing the container]:seconds to before killing:(1 5 10 30 60)" \ + "($help -)*:containers:__docker_containers_ids" && ret=0 + ;; (rm) _arguments $(__docker_arguments) \ $opts_help \ @@ -1999,6 +2017,7 @@ __docker_subcommand() { _arguments $(__docker_arguments) \ $opts_help \ "($help -a --all)"{-a,--all}"[Show all containers (default shows just running)]" \ + "($help)--format=[Pretty-print images using a Go template]:template: " \ "($help)--no-stream[Disable streaming stats and only pull the first result]" \ "($help -)*:containers:__docker_runningcontainers" && ret=0 ;; From 3bd6be10769097351156c6460db78b5f529f4b03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 25 Oct 2016 06:04:08 +0200 Subject: [PATCH 3/6] Change link to agnoster wiki + format changes https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#agnoster --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 268c1b39..5902c419 100644 --- a/README.md +++ b/README.md @@ -78,9 +78,9 @@ ZSH_THEME="robbyrussell" To use a different theme, simply change the value to match the name of your desired theme. For example: ```shell -ZSH_THEME="agnoster" # (this is one of the fancy ones ; - # you might need to install a specific font on your console's host for this to work ; - # see https://github.com/powerline/fonts/tree/master/DejaVuSansMono) +ZSH_THEME="agnoster" # (this is one of the fancy ones) +# you might need to install a special Powerline font on your console's host for this to work +# see https://github.com/robbyrussell/oh-my-zsh/wiki/Themes#agnoster ``` Open up a new terminal window and your prompt should look something like... From b1efd04f947ca9d391cf36dbca643b3845d8acee Mon Sep 17 00:00:00 2001 From: jotadrilo Date: Tue, 25 Oct 2016 06:25:07 +0200 Subject: [PATCH 4/6] add docker-compose down alias (#5557) * add docker-compose down alias * rename `docker-compose down` alias to `dcdn` --- plugins/docker-compose/docker-compose.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/docker-compose/docker-compose.plugin.zsh b/plugins/docker-compose/docker-compose.plugin.zsh index 7e330701..4e4ac114 100644 --- a/plugins/docker-compose/docker-compose.plugin.zsh +++ b/plugins/docker-compose/docker-compose.plugin.zsh @@ -18,5 +18,6 @@ alias dcrm='docker-compose rm' alias dcr='docker-compose run' alias dcstop='docker-compose stop' alias dcup='docker-compose up' +alias dcdn='docker-compose down' alias dcl='docker-compose logs' alias dclf='docker-compose logs -f' From d9695a8b00c6960417726e49a32df4cf760e055e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ordon?= Date: Tue, 25 Oct 2016 05:29:35 +0100 Subject: [PATCH 5/6] Add more simulator aliases (#5550) --- plugins/react-native/react-native.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/react-native/react-native.plugin.zsh b/plugins/react-native/react-native.plugin.zsh index 9463a98b..f19cba82 100644 --- a/plugins/react-native/react-native.plugin.zsh +++ b/plugins/react-native/react-native.plugin.zsh @@ -2,6 +2,8 @@ alias rnand='react-native run-android' alias rnios4s='react-native run-ios --simulator "iPhone 4s"' alias rnios5='react-native run-ios --simulator "iPhone 5"' alias rnios5s='react-native run-ios --simulator "iPhone 5s"' +alias rnios6='react-native run-ios --simulator "iPhone 6"' +alias rnios6s='react-native run-ios --simulator "iPhone 6s"' alias rnios='react-native run-ios' alias rnlink='react-native link' From 0ee89d965ecaa4f32cf2d1039e9d84a73eb206cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 25 Oct 2016 07:17:29 +0200 Subject: [PATCH 6/6] Add brew completion missing disclaimer --- plugins/brew/brew.plugin.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index 5b584732..d4289c98 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -2,3 +2,19 @@ alias brews='brew list -1' alias bubo='brew update && brew outdated' alias bubc='brew upgrade && brew cleanup' alias bubu='bubo && bubc' + +if mkdir "$ZSH_CACHE_DIR/.brew-completion-message" 2>/dev/null; then + print -P '%F{yellow}'Oh My Zsh brew plugin: + cat <<-'EOF' + + With the advent of their 1.0 release, Homebrew has decided to bundle + the zsh completion as part of the brew installation, so we no longer + ship it with the brew plugin; now it only has brew aliases. + + If you find that brew completion no longer works, make sure you have + your Homebrew installation fully up to date. + + You will only see this message once. + EOF + print -P '%f' +fi