Skip to content

Commit 40eabd1

Browse files
committed
Add cd command
1 parent 0d12a3c commit 40eabd1

File tree

2 files changed

+9
-12
lines changed

2 files changed

+9
-12
lines changed

requirements.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/pytgpt/console.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,15 @@ def do_shell(self, line):
781781
if click.confirm("Do you wish to run the command(s) generated in your system"):
782782
self.do_sys(self.bot.get_message(self.bot.last_response))
783783

784+
@busy_bar.run("While changing directory")
785+
def do_cd(self, line):
786+
"""Change directory
787+
Usage :
788+
cd <path-to-directory>
789+
"""
790+
assert line, "File path is required"
791+
os.chdir(line)
792+
784793
def do_clear(self, line):
785794
"""Clear console"""
786795
sys.stdout.write("\u001b[2J\u001b[H")

0 commit comments

Comments
 (0)