dklet 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/dklet.rc +10 -8
  3. data/lib/dklet/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cbc1976787fa72c2f0f1807718ba0fec1e8f2183a8c08b899d0a5751d132ebc4
4
- data.tar.gz: 016a805f3bc3786eb515ee60feec68c26bd3440566b4641c0a8396d4c3e863e0
3
+ metadata.gz: 1cc6111b694731072d22d3426582177a180aa902423ce8c2af7faa5283dcdafc
4
+ data.tar.gz: 249d9bb8b05a2741936dd99acd4ef78d12d157c37bfa8715b88b91522dca5a64
5
5
  SHA512:
6
- metadata.gz: 77c3f37998fea48b4d1783da526f6ffbd1e1d54bc54e1940c3196add1b855b29944091e2259823c32bf282778428141c9a71aa08f2ce4c8e81a3126c31c3a560
7
- data.tar.gz: d7661aa2cb86358a197cc06b45cd0ba8165d53310889f921a06f7321ac1a6ed787b3b06941156d3f049afa47e127cbe45d887b54e3070457d862d40b60d9be44
6
+ metadata.gz: d505c3c32b784077240277ee45a88a0c2caba292b49ab432db1742b5f8e6ce7be689ea0f0e19069c811c101946c387f4314411d25740b4391b6ae5225ffabc92
7
+ data.tar.gz: ba52933fa1c49eab057d81d7e860c802cf3fae233100afe08f20ae5eeb145e226fe270fa790d2864aec66ec9e1f528dbdfba4d558de127f1a56926710db84765
data/dklet.rc CHANGED
@@ -1,28 +1,28 @@
1
- #!/usr/bin/env bash
2
- if [ -z $BOOTER_DKLET_RC ]; then
3
- : # do nothing
4
- else
1
+ #!/usr/bin/env bash
2
+ if [ ! -z $BOOTER_DKLET_RC ];then
5
3
  if [ -z $FORCE_RC ]; then
6
4
  echo Warning: has sourced $BOOTER_DKLET_RC!
7
5
  return 1
8
6
  fi
9
7
  fi
10
- BOOTER_DKLET_RC=$(evar=${BASH_SOURCE[0]} ruby -e "puts File.realpath(ENV['evar'])")
8
+ BOOTER_DKLET_RC=$( ruby -e "puts File.realpath('${BASH_SOURCE[0]}')")
11
9
  BOOTER_DKLET_HOME=$(dirname $BOOTER_DKLET_RC)
12
- #[ -d "$BOOTER_DKLET_HOME/bin" ] && PATH=$PATH:$BOOTER_DKLET_HOME/bin
13
- # default use exe
10
+
14
11
  export PATH=$PATH:$BOOTER_DKLET_HOME/exe
15
12
 
16
13
  function dklet(){
17
14
  tp=${1:-cd}
18
15
  case "$tp" in
16
+ rc|file)
17
+ echo "$BOOTER_DKLET_RC"
18
+ ;;
19
19
  home|root)
20
20
  echo $BOOTER_DKLET_HOME
21
21
  ;;
22
22
  cd)
23
23
  cd "$BOOTER_DKLET_HOME"
24
24
  ;;
25
- rc|vi)
25
+ edit|vi)
26
26
  vi "$BOOTER_DKLET_RC"
27
27
  $FUNCNAME reload
28
28
  ;;
@@ -34,8 +34,10 @@ function dklet(){
34
34
  echo ==has sourced "$BOOTER_DKLET_RC"
35
35
  ;;
36
36
  help|h)
37
+ echo rc file: "$BOOTER_DKLET_RC"
37
38
  type $FUNCNAME
38
39
  ;;
40
+
39
41
  ## app related
40
42
  gem)
41
43
  gem query dklet -l
data/lib/dklet/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Dklet
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
 
4
4
  def self.version
5
5
  VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dklet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ruijian Cao