Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[config] .oshrc + miscellany from OSH usage #245

Closed
okayzed opened this issue Mar 17, 2019 · 8 comments
Closed

[config] .oshrc + miscellany from OSH usage #245

okayzed opened this issue Mar 17, 2019 · 8 comments

Comments

@okayzed
Copy link
Contributor

okayzed commented Mar 17, 2019

Does ~/.oshrc get sourced? I downloaded and installed the 0.6.pre15 release and created my ~/.oshrc file, but it doesn't get run at startup. I moved the file to ~/.config/oil/oshrc and it does get sourced properly.

I'm about to try OSH fulltime, we'll see how it goes. I'll keep updating this issue with various things I run into. so far:

  1. bash completion errors (which I think you already know about and mention your local bash completion fork)
  2. displays '/home/okay' instead of "~" in command prompt
@okayzed
Copy link
Contributor Author

okayzed commented Mar 17, 2019

  1. tab completion for filenames adds a large amount of space to my command prompt. When I type cd ~/<TAB>, there will be about 40 spaces added to the current command. The spaces are cosmetic, because i can still type in a valid path and change to it.

@andychu
Copy link
Contributor

andychu commented Mar 17, 2019

Hm somehow I didn't notice (2) ! Thanks for that.

For (1), here is my configuration on Ubuntu:

https://github.com/oilshell/oil/wiki/How-To-Test-OSH

There are a number of steps to get it working, but it's straightforward. Basically sync my fork of bash-completion and checkout a branch.

  • I changed it to ~/.config/oil/oshrc, so ~/.oshrc no longer gets sourced. I figure people can make a symlink if they don't want to type the long path.

I'm not sure what you mean by (3). That sounds like a bug that I don't see. Something like that happens on OS X. Does it happen every time?

@okayzed
Copy link
Contributor Author

okayzed commented Mar 17, 2019

re: 3) yes, happens every time. https://gtg.kthxb.ai/~okay/40chars.ttyrec

for .oshrc: ah. I did not read the "How to Test OSH" page carefully enough. I saw .oshrc and assumed it worked, sorry! I would add a note there for other non-careful readers like myself.

@andychu
Copy link
Contributor

andychu commented Mar 19, 2019

@okayzed I fixed (2) (#246) today.

For the drawing issue in (3), are you using OSH 0.6.pre16 ? I have seen this type of thing before, but I thought I fixed it.

But there are other drawing problems I know of so it's possible it's still there.

i.e. what is osh --version ?

@okayzed
Copy link
Contributor Author

okayzed commented Mar 19, 2019

okay@chalk:~$ osh --version
Oil version 0.6.pre16
Release Date: 2019-03-03 17:13:47+00:00
Arch: x86_64
OS: Linux
Platform: #49-Ubuntu SMP Wed Feb 6 09:33:07 UTC 2019
Compiler: GCC 7.3.0
Interpreter: OVM
Interpreter version: 2.7.13
Bytecode: bytecode-opy.zip
okay@chalk:~$

@andychu
Copy link
Contributor

andychu commented Mar 19, 2019

OK thanks, I think I need to revert back to the "basic" display which behaves more like bash. I was trying to make something nicer, but it's not easy :) One issue I discovered is that GNU readline also needs to handle SIGWINCH.

andychu pushed a commit that referenced this issue Mar 20, 2019
This fixes some issues that look similar to #245 (see ttyplay), but I'm
not 100% sure it's the same issue.
andychu pushed a commit that referenced this issue Mar 21, 2019
Also mention the simpler history expansion rules.

Addresses issue #248 and #245.
@andychu
Copy link
Contributor

andychu commented Mar 21, 2019

OK, I'm pretty sure the drawing problem was the same as #252, which is fixed with the latest release:

http://www.oilshell.org/release/0.6.pre17/

You definitely have a color prompt, and the width was calculated incorrectly, and it should now be correct.

And I documented oshrc and fixed the other bug too. Please try out the latest release and let me know what else you see. I'm sure there are more problems!

@andychu andychu closed this as completed Mar 21, 2019
@okayzed
Copy link
Contributor Author

okayzed commented Mar 21, 2019

great, thanks! I did a chsh, I'm a little afraid of what will happen when I reboot my machine and use OSH fulltime for every shell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants