From b10b1802a52978f3f8e484dcff5eef55df343527 Mon Sep 17 00:00:00 2001 From: svkalinin Date: Mon, 28 Nov 2022 15:29:40 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=B8?= =?UTF-8?q?=D0=BB=20=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D1=83=20git=20=D0=BF?= =?UTF-8?q?=D1=80=D0=B8=20=D0=BE=D1=82=D0=BA=D1=80=D1=8B=D1=82=D0=B8=D0=B8?= =?UTF-8?q?=20=D1=84=D0=B0=D0=B9=D0=BB=D0=B0=20=D0=B8=D0=BB=D0=B8=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=B0=20=D0=B5=D1=81=D0=BB?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE=D1=80?= =?UTF-8?q?=D0=B8=D0=B9=20=D0=BD=D0=B5=20=D0=B8=D0=BD=D0=B8=D1=86=D0=B8?= =?UTF-8?q?=D0=B0=D0=BB=D0=B8=D0=B7=D0=B8=D1=80=D0=BE=D0=B2=D0=B0=D0=BD=20?= =?UTF-8?q?(=D0=BD=D0=B5=D1=82=20.git=20=20=D0=BA=D0=B0=D1=82=D0=B0=D0=BB?= =?UTF-8?q?=D0=BE=D0=B3=D0=B0=20=D0=B2=D0=BD=D1=83=D1=82=D1=80=D0=B8=20?= =?UTF-8?q?=D0=BF=D1=80=D0=BE=D0=B5=D0=BA=D1=82=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- lib/git.tcl | 14 ++++++++++++-- projman.tcl | 2 +- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ffac8d8..7c47e8f 100644 --- a/README.md +++ b/README.md @@ -96,7 +96,7 @@ Or type "projman" into terminal, Or choose the name of the program "Projman" on - Ctrl-V - Paste text from buffer - Alt-P - Show/Hide the file tree panel -- Alt-W - Delete the word +- Alt-W - Delete the current word - Alt-E - Delete text from current position to end of line - Alt-B - Delete text from current position to begin of line - Alt-R - Delete current line diff --git a/lib/git.tcl b/lib/git.tcl index a53839b..2c3ed63 100644 --- a/lib/git.tcl +++ b/lib/git.tcl @@ -92,8 +92,11 @@ namespace eval Git { global cfgVariables activeProject set cmd exec set d [pwd] - if {$activeProject ne ""} { + if {$activeProject ne "" && [file isdirectory $activeProject] == 1} { cd $activeProject + if ![file exists .git] { + return + } } else { return "" } @@ -127,7 +130,14 @@ namespace eval Git { proc Status {} { global cfgVariables activeProject - cd $activeProject + if [file isdirectory $activeProject] { + cd $activeProject + if ![file exists .git] { + return + } + } else { + return false + } set cmd exec lappend cmd $cfgVariables(gitCommand) lappend cmd "status" diff --git a/projman.tcl b/projman.tcl index 784bc33..783f7f9 100755 --- a/projman.tcl +++ b/projman.tcl @@ -10,7 +10,7 @@ exec wish "$0" -- "$@" ###################################################### # Version: 2.0.0 # Release: alpha -# Build: 28112022130305 +# Build: 28112022152737 ###################################################### # определим текущую версию, релиз и т.д.