upterm icon indicating copy to clipboard operation
upterm copied to clipboard

`source` seems to break Upterm

Open apetresc opened this issue 6 years ago • 13 comments

This is very strange; when I try to source ~/.profile in Upterm (with zsh), I get this error:

screen shot 2017-09-21 at 10 53 45 am

This doesn't appear to be an error from the shell, but from Upterm itself. Sourcing ~/.profile from iTerm or Terminal, of course, works.

So I try source-ing something else, something innocent like .zshrc. That gets even weirder. It appears to exit without errors, but it didn't actually run to completion (I know because I have a fortune | cowsay at the end of my .zshrc which didn't show up), and once it finishes "running", nothing else works. Trying anything results in "Upterm: command * not found":

screen shot 2017-09-21 at 10 57 13 am

If I had to guess, it looks like source itself is being overridden by Upterm somehow, and not being implemented properly.

Let me know if you need me to post the ~/.profile or ~/.zshrc files themselves.

apetresc avatar Sep 21 '17 14:09 apetresc

@apetresc, yes, please post content of ~/.profile.

vlad-shatskyi avatar Sep 21 '17 15:09 vlad-shatskyi

I'm having a similar issue:

image

Could this be what is overriding the source command?

https://github.com/railsware/upterm/blob/e778fc4a2edd166c7ec12b7a3f8d4d81cdca92d4/src/PTY.ts#L93

kazuar avatar Sep 23 '17 22:09 kazuar

I have the same issue. I have this on my .bash_profile

case $- in
    *i*) source /code/config-files/bashrc
esac

so that bash can read /code/config-files/bashrc and load aliases, functions, etc. But upterm doesn't

sg-s avatar Sep 26 '17 13:09 sg-s

I get the same issues trying to activate a python virtual environment: source bin/activate

AIRMAP-kevin avatar Sep 29 '17 03:09 AIRMAP-kevin

experiencing the same issue. Seems like the command source command doesnt work at all.

Niraj-Fonseka avatar Oct 15 '17 00:10 Niraj-Fonseka

same issue I try to run source ... (load some env variables) && go run ... Nothing happens. That is kind of deal breaker for me.

YannHulot avatar Oct 24 '17 05:10 YannHulot

@AIRMAP-kevin Me too. I can only switch to iterm

maczyt avatar Dec 05 '17 11:12 maczyt

Hi,

Having the same issue.

I was using Upterm to do some work inside a mounted directory vis sshfs and OSX fuse (using macOS high sierra to mount a directory of another macOS high sierra computer connected in local network).

The connection was lost (I think) and the directory was unmounted but Upterm was still inside it.

Upterm stayed in a state where it was still inside the mounted directory and only basic shell commands worked and couldn't get out of the mounted directory, even after quit Upterm and relaunch.

Eventually remounted the directory with iTerm2 and Upterm was able to cd out of the mounted directory but only basic shell functions worked and sourcing ~/.bashrc would return cannot read property length of undefined (this persisted after quit and relaunch).

Uninstalled via homebrew cask and reinstalled and the behavior persisted.

Deleted via appcleaner, and installed again via brew cask and behavior persisted.

So Upterm is pretty much unusable at this point.

cdleon avatar Oct 09 '18 16:10 cdleon

I am having the same issue. Anyone working on this issue?

ardunn avatar Feb 22 '19 22:02 ardunn

@ardunn There hasn't been a substantial commit to this repo in almost half a year; I don't think anything is being worked on anymore. I wouldn't hold my breath for a fix here.

apetresc avatar Feb 27 '19 17:02 apetresc

Sorry guys, but main contributor cannot help - https://github.com/railsware/upterm/issues/1301

If you have power - just made PR with fix - I will accept it.

le0pard avatar Feb 27 '19 17:02 le0pard

I see - that's very sad, I'm sorry to hear it :(

apetresc avatar Feb 27 '19 19:02 apetresc

In addition to source, I think all or most builtins might not work? type, hash, exec, help, and some others I've tried just don't exist at all. This breaks all sorts of nice things, like writing one-off scripts on the command line, sourcing config, etc.

It seems like this, #180, #449, #1216, #1262, #1260, #243, #94, #479, and maybe others are related. Would it be worth combining all of them and adding a note in the readme that some of this stuff just isn't implemented yet?

zacanger avatar Mar 09 '19 20:03 zacanger