dip 3.4.2 → 3.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6b21915c036184db87af0116695d6b54ab3345ded9f3ed9747c01c5dbe454c6d
4
- data.tar.gz: 50d05b8888f9636f202873b1c1fe684e312994f25f4d400b1a0c9394b020ff01
3
+ metadata.gz: 15949983c3c84bfa0f4141f172bbb88d2955b162a77cf10fa86d2d24003e8152
4
+ data.tar.gz: 72d74278d28a64979c667af334f8daf0368b58c5fc3c84ca740420171f040cb6
5
5
  SHA512:
6
- metadata.gz: cc24363f19b3b433efb1602e7e22b641cbca774b2d4bfc6a34cbf5683e4a170065615589e7abc32cba7a3039cc5378a6b96aea381ec95421115594aff01cc3f5
7
- data.tar.gz: 9927d87bd8dc6b75a0115e1c363566d5e27e00fd788cbabbe56daff5764870254375f7015b30da2d33645ee695ca3165939bccde8bb5dfc579e7f2b02a363f08
6
+ metadata.gz: bdab87c4f71ba76bb7a28ba541448c37716b14b842b6daceef114b7cca6f06e49f10b460896434013ab6b056672d26b23c52dc107a6421cb1d51d562e5e9fe6e
7
+ data.tar.gz: fd164d3b1d79632e3fbaea93d782aa0ff3153ecad661db1fd0983e835c36cc6adbad4ee1f9ec85eafe425010d2dac967d774d5c367f48aab127ccd2f8f07b53b
data/README.md CHANGED
@@ -123,8 +123,6 @@ dip compose up -d redis
123
123
 
124
124
  Dip can be injected into current shell. For now, it supported ZSH only.
125
125
 
126
- Inject Dip rc file (by default it saved to ~/.dip_shell_rc) into ZSH:
127
-
128
126
  ```sh
129
127
  dip console | source /dev/stdin
130
128
  ```
@@ -14,24 +14,35 @@ module Dip
14
14
 
15
15
  def script
16
16
  <<-SH.gsub(/^[ ]{12}/, '')
17
- if [ "$DIP_SHELL" != "1" ]; then
18
- export DIP_SHELL=zsh
19
- export DIP_EARLY_ENVS=#{ENV.keys.join(',')}
17
+ export DIP_SHELL=1
18
+ export DIP_EARLY_ENVS=#{ENV.keys.join(',')}
19
+ export DIP_PROMPT_TEXT="ⅆ"
20
+
21
+ if [[ "$ZSH_THEME" = "agnoster" ]]; then
22
+ eval "`declare -f prompt_end | sed '1s/.*/_&/'`"
23
+
24
+ function prompt_end() {
25
+ if [[ -n $DIP_PROMPT_TEXT ]]; then
26
+ prompt_segment magenta white "$DIP_PROMPT_TEXT"
27
+ fi
28
+
29
+ _prompt_end
30
+ }
20
31
  fi
21
32
 
22
- function _dip_remove_aliases() {
33
+ function dip_remove_aliases() {
23
34
  # will be redefined
24
35
  }
25
36
 
26
- function _dip_source_aliases() {
37
+ function dip_source_aliases() {
27
38
  #{Dip.bin_path} console inject | source /dev/stdin
28
39
  }
29
40
 
30
- _dip_source_aliases
41
+ dip_source_aliases
31
42
 
32
43
  function chpwd() {
33
- _dip_remove_aliases
34
- _dip_source_aliases
44
+ dip_remove_aliases
45
+ dip_source_aliases
35
46
  }
36
47
  SH
37
48
  end
data/lib/dip/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dip
4
- VERSION = "3.4.2"
4
+ VERSION = "3.5.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dip
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.2
4
+ version: 3.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - bibendi
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-10-15 00:00:00.000000000 Z
11
+ date: 2018-10-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor