upterm icon indicating copy to clipboard operation
upterm copied to clipboard

cd does not work

Open apaleslimghost opened this issue 8 years ago • 17 comments

Running cd does nothing. There is no output in the console. I've tested this on 0.0.34 and latest master.

apaleslimghost avatar Jun 06 '16 09:06 apaleslimghost

cd appears to work for me on 0.0.34. I am running El Capitan 10.11.5 (15F34). I do not see any console output, but directories have changed if I check with ls. What is your OS version? Did you install using brew cask install black-screen?

vinnymac avatar Jun 06 '16 16:06 vinnymac

Can confirm that a new install of black-screen (via brew cask install) on El Capitan 10.11.5, that cd does not work on the latest version.

cryptiklemur avatar Jun 06 '16 19:06 cryptiklemur

cd is working on the latest version installed via brew cask for me on:

image

Jarred-Sumner avatar Jun 08 '16 21:06 Jarred-Sumner

@quarterto there is current directory on the left side of the bottom panel. Does it change when you cd?

vlad-shatskyi avatar Jun 10 '16 12:06 vlad-shatskyi

No.

apaleslimghost avatar Jun 10 '16 12:06 apaleslimghost

Please click on the smiley below, if you experience the same issue.

vlad-shatskyi avatar Jun 10 '16 21:06 vlad-shatskyi

I had the same issue. Can you guys run alias cd in your command line? If you you for example have alias cd="nocorrect cd" black-screen will use this alias to expand your prompt input.

But after that it gets lost because cd expands to nocorrect cd and black-screen doesn't know nocorrect command. Quick solution is to remove this alias from your config files.

Long lasting solution is to let PTY do it's job with cd and then parse the new folder from it. Another argument for #449

(this is the reason why the command (at least in my case) silently passes https://github.com/shockone/black-screen/blob/master/src/utils/Shell.ts#L50)

viktomas avatar Jun 26 '16 08:06 viktomas

@viktomas how to parse shell session environment and not to lose the return status of the executed command?

For example, I execute cd foo; false and want to know both the new PWD and that $? is 1.

vlad-shatskyi avatar Jun 26 '16 20:06 vlad-shatskyi

@shockone: Understand. I'll try to have a look how the $PROMPT_COMMAND in zsh works. I don't think it's going to be an easy issue to solve and I'm not even sure that pty.js will provide all the interface we need.

viktomas avatar Jun 26 '16 21:06 viktomas

@viktomas it's not the same as in $PROMPT_COMMAND. A shell preserves the same session between jobs, but we create a new one every time in order to know when a previous job ended.

vlad-shatskyi avatar Jun 26 '16 21:06 vlad-shatskyi

Hey I'm also experiencing this issue I didn't know what to include in the debug info so I hope this picture will do

steelbrain avatar Jul 07 '16 14:07 steelbrain

Same here on OSX 10.11.6 (15G31). Thought first it might be an Issue with zsh, but the same happens with bash as well.

sebastianpicklum avatar Jul 21 '16 11:07 sebastianpicklum

Same here with zsh. I'm using macOS Sierra(10.12) Beta (16A201w).

sei0o avatar Jul 30 '16 14:07 sei0o

I digged a little deeper and found following error message (funnily I don’t use rvm)

fs.js:1578 Uncaught (in promise) Error: ENOENT: no such file or directory, realpath '/Users/MYUSER/.rvm/rubies/default' at Error (native) at Object.realpathSync (fs.js:1578:18) at Object.fs.realpathSync (ELECTRON_ASAR.js:303:29) at /Applications/Black Screen.app/Contents/Resources/app.asar/compiled/src/plugins/RVM.js:23:23 at next (native) at fulfilled (/Applications/Black Screen.app/Contents/Resources/app.asar/compiled/src/plugins/RVM.js:4:58)

sebastianpicklum avatar Aug 23 '16 12:08 sebastianpicklum

Where are we at on this? I'm getting the same problem. @shockone

leothelocust avatar Nov 01 '16 21:11 leothelocust

The workaround is to remove the cd='nocorrect cd' alias from your shell config.

vlad-shatskyi avatar Nov 01 '16 21:11 vlad-shatskyi

screen shot 2017-10-30 at 1 54 42 pm

Seems like it's the same problem. fasd_cd is a function defined in prezto https://github.com/sorin-ionescu/prezto/blob/master/modules/fasd/init.zsh#L40
it works fine in zsh with iterm.

yqrashawn avatar Oct 30 '17 06:10 yqrashawn