chrissimpkins / glue

Glue is a plugin that joins your shell to Sublime Text in quasi-perfect harmony.
http://gluedocs.readthedocs.org/
MIT License
254 stars 10 forks source link

cd does not change directory #25

Open noa opened 10 years ago

noa commented 10 years ago

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.

chrissimpkins commented 10 years ago

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 commented 10 years ago

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?

noa commented 10 years ago

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).

chrissimpkins commented 10 years ago

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?

noa commented 10 years ago

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

chrissimpkins commented 10 years ago

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

chrissimpkins commented 9 years ago

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?

chetan51 commented 9 years ago

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
chrissimpkins commented 9 years ago

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 commented 9 years ago

Are you using sublime text 2 or 3?

chetan51 commented 9 years ago

3

On Wed, Dec 17, 2014, 6:58 AM Chris Simpkins notifications@github.com 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.

chrissimpkins commented 9 years ago

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

ghost commented 9 years ago

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

chrissimpkins commented 9 years ago

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.