gibson-cli 0.1.4__py3-none-any.whl → 0.1.5__py3-none-any.whl

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.
@@ -10,13 +10,11 @@ class Completions:
10
10
  completions_location = f"$HOME/{self.gibson_config}/bash_completion"
11
11
  installation = f"""\n[ -s "{completions_location}" ] && \\. "{completions_location}" # Load gibson auto completion\n"""
12
12
 
13
- with open(f"{self.user_home}/.bashrc", "r+") as f:
14
- if completions_location not in f.read():
15
- f.write(installation)
16
-
17
- with open(f"{self.user_home}/.zshrc", "r+") as f:
18
- if completions_location not in f.read():
19
- f.write(installation)
13
+ for file in [f"{self.user_home}/.bashrc", f"{self.user_home}/.zshrc"]:
14
+ with open(file, "a+") as f:
15
+ f.seek(0)
16
+ if completions_location not in f.read():
17
+ f.write(installation)
20
18
 
21
19
  return self
22
20
 
@@ -28,8 +26,12 @@ class Completions:
28
26
  except FileNotFoundError:
29
27
  return self
30
28
 
31
- completions = f"{self.user_home}/{self.gibson_config}/bash_completion"
32
- with open(completions, "w") as f:
29
+ try:
30
+ os.mkdir(f"{self.user_home}/{self.gibson_config}")
31
+ except FileExistsError:
32
+ pass
33
+
34
+ with open(f"{self.user_home}/{self.gibson_config}/bash_completion", "w") as f:
33
35
  f.write(contents)
34
36
 
35
37
  return self
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: gibson-cli
3
- Version: 0.1.4
3
+ Version: 0.1.5
4
4
  Summary: Gibson Command Line Interface
5
5
  Author-email: GibsonAI <noc@gibsonai.com>
6
6
  Project-URL: Homepage, https://gibsonai.com/
@@ -55,7 +55,7 @@ gibson/conf/dev/Schema.py,sha256=kOSlX1jEyVb82xd8TO8jEAimLcaefIFJr6d2JYvyTqg,74
55
55
  gibson/conf/tests/test_conf_Dependencies.py,sha256=LITeeYiqXM5rKkyWFBqcnMvUR5pzDRuHVAngH372jWc,116
56
56
  gibson/conf/tests/test_conf_Platform.py,sha256=Zc53IsZmV-hT9VRrZEPNrsuehSdWnJXWKGMmOhEqWHo,138
57
57
  gibson/core/CommandRouter.py,sha256=jYKWpsCQGLjuCPkg7C8PPBnS07AddrUv3APTqB0s2C0,9558
58
- gibson/core/Completions.py,sha256=r9GL-da-mq2HftWs2rmxnmasMEkJ3MMhzOn02YZE9sE,1116
58
+ gibson/core/Completions.py,sha256=N-mfeImSzw-d3Lrpu1KVnt0geMuKkbTaHpYTMYcPcAQ,1152
59
59
  gibson/core/Configuration.py,sha256=6EX8vh7qf15OB1hDfr2lYyKz6r-nB3KG0ltiax80_dU,14300
60
60
  gibson/core/Conversation.py,sha256=rKSfJao5VGj1WyWHjfbKnYqWS9j0fPmDCF5uX9e04zs,8196
61
61
  gibson/core/Env.py,sha256=7HFKGah25KjLelyOjYS8ylR6yDScT6utyZe7HdB3aRE,431
@@ -101,8 +101,8 @@ gibson/structure/tests/test_Entity.py,sha256=Gl9f1NcEKdpWCx4W3takFFzp18mLhCYWKrd
101
101
  gibson/tests/test_Env.py,sha256=DPWmP0-aEelducq9bAwv7rKoY2NjWXUeCrzfJDQkn2M,369
102
102
  gibson/tests/test_Memory.py,sha256=YP7owToABAk_-s7fD5UG0HTc4lamDjdA39JUlLnk3Fg,2574
103
103
  gibson/tests/test_utils.py,sha256=r_y-EG05YTCNtL8MWiAK1KmPsmeoMgypKsQC_lVgOtM,559
104
- gibson_cli-0.1.4.dist-info/METADATA,sha256=_HBe3pwBB0skSUTkik-RABVEKkepv4joPnLbOMn4jVY,11437
105
- gibson_cli-0.1.4.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
106
- gibson_cli-0.1.4.dist-info/entry_points.txt,sha256=j5VUvq3AzL21xPvVC24zMoXFt-I5lUWulr66nL3OAPM,50
107
- gibson_cli-0.1.4.dist-info/top_level.txt,sha256=GIvzfJmscYHhX9eE-3SJmCIcjF3If-EtcoQdnlmsBuQ,7
108
- gibson_cli-0.1.4.dist-info/RECORD,,
104
+ gibson_cli-0.1.5.dist-info/METADATA,sha256=T4hgBIfOE1f_0YHtcf4n9vMbJHHKfK12HsgkXj-OLqk,11437
105
+ gibson_cli-0.1.5.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
106
+ gibson_cli-0.1.5.dist-info/entry_points.txt,sha256=j5VUvq3AzL21xPvVC24zMoXFt-I5lUWulr66nL3OAPM,50
107
+ gibson_cli-0.1.5.dist-info/top_level.txt,sha256=GIvzfJmscYHhX9eE-3SJmCIcjF3If-EtcoQdnlmsBuQ,7
108
+ gibson_cli-0.1.5.dist-info/RECORD,,