glue icon indicating copy to clipboard operation
glue copied to clipboard

cd does not change directory

Open noa opened this issue 11 years ago • 14 comments

On a Mac, I tried the following:

  1. Open glue by right-clicking on my project directory and pressing "Open Glue Terminal"
  2. Enter "cd build"

✪ [ /Volumes/LaCie/Work/project/build ] cd build /Volumes/LaCie/Work/project/build

  1. Enter "make"

✪ [ /Volumes/LaCie/Work/project ] make make: *** No targets specified and no makefile found. Stop.

noa avatar Aug 22 '14 14:08 noa

Strange. Haven't encountered this issue before. Using mavericks version of Mac OS and is this a fresh open of Glue in Sublime Text or did you use it and close the plugin before this occurred?

chrissimpkins avatar Aug 22 '14 14:08 chrissimpkins

Also can you display your files in the current working directory on open and then on directory change to verify the directory that you are in?

chrissimpkins avatar Aug 22 '14 14:08 chrissimpkins

OSX 10.9.4 and I installed Glue using the package manager today.

ls displays the files in my project directory after a fresh open of Glue. After I type "cd build", ls continues to show the files in the project directory (rather than in project/build, as desired).

The source of the weirdness could be symlinks?

My project directory is ~/External/Work/project which symlinks to my external drive /Volumes/LaCie/Work/project (which is what's shown in the Glue terminal output).

noa avatar Aug 22 '14 14:08 noa

I bet you are correct. This is a home brewed cd that I made because you can't implement the system cd command. Does cd work in your non-sym linked directory structure?

chrissimpkins avatar Aug 22 '14 14:08 chrissimpkins

Hmm, surprisingly I get the same behavior in non-symlinked directories. Note: this is using the latest version of Sublime Text 3.

Here's output for a non-symlinked project:

✪ [ /Users/nico/Work/libPLUMP ] ls AUTHORS COPYING ChangeLog INSTALL LICENSE Makefile.am NEWS README aclocal.m4 autom4te.cache bindings config.log configure configure.ac examples libplump m4 src terminal.glue

✪ [ /Users/nico/Work/libPLUMP/src ] cd src /Users/nico/Work/libPLUMP/src

✪ [ /Users/nico/Work/libPLUMP ] ls AUTHORS COPYING ChangeLog INSTALL LICENSE Makefile.am NEWS README aclocal.m4 autom4te.cache bindings config.log configure configure.ac examples libplump m4 src terminal.glue

noa avatar Aug 22 '14 14:08 noa

Ok. Thanks for reporting it. Will take a look into it and let you know what I come up with.

chrissimpkins avatar Aug 22 '14 14:08 chrissimpkins

Sorry for the delay. Have been on vacation and just returning. I cannot reproduce this issue in the current version of ST3 (build 3065). Is it still happening?

chrissimpkins avatar Aug 31 '14 20:08 chrissimpkins

I'm seeing this as well, but even more bizarrely. After the first command, Glue seems to go back to my user directory. I'm launching it using the Command Palette on an open file in an open project.

█ [ /Users/Chetan/Dropbox/Development/nupic.research ] ls
LICENSE.txt
README.md
fetch_binary.py
image_test
nupic_sha.txt
sdr_paper
sensorimotor

█ [ /Users/Chetan ] ls
Applications
Desktop
Documents
Downloads
Dropbox
Google Drive
Library
Movies
Music
Pictures
Public
dotfiles

█ [ /Users/Chetan ] ls
Applications
Desktop
Documents
Downloads
Dropbox
Google Drive
Library
Movies
Music
Pictures
Public
dotfiles

chetan51 avatar Dec 15 '14 22:12 chetan51

Ok I will take a look at it. It looks like the initial directory is being set incorrectly. Thanks for the report. Will let you know what I find.

chrissimpkins avatar Dec 17 '14 12:12 chrissimpkins

Are you using sublime text 2 or 3?

chrissimpkins avatar Dec 17 '14 14:12 chrissimpkins

3

On Wed, Dec 17, 2014, 6:58 AM Chris Simpkins [email protected] wrote:

Are you using sublime text 2 or 3?

Reply to this email directly or view it on GitHub https://github.com/chrissimpkins/glue/issues/25#issuecomment-67333497.

chetan51 avatar Dec 17 '14 16:12 chetan51

Thanks. Python 2 in st2 and Python 3 in st3. Let me look into it.

chrissimpkins avatar Dec 17 '14 17:12 chrissimpkins

Hi Chris, I can also report that I am having this issue... i run 'cd ..', which displays the path to one directory up from the previous, but then running 'pwd' prints the previous directory, and 'ls' also lists the contents of the previous directory

ghost avatar Jun 16 '15 10:06 ghost

Thanks for the report. I haven't dug into this code for some time. It has proven problematic to test inside the ST Python interpreter (across multiple platforms and multiple versions of ST...). Will look into it.

chrissimpkins avatar Jun 16 '15 15:06 chrissimpkins