Use $XONSHRC environment variable to ascertain files#274
Open
rickysarraf wants to merge 1 commit intosbstp:masterfrom
Open
Use $XONSHRC environment variable to ascertain files#274rickysarraf wants to merge 1 commit intosbstp:masterfrom
rickysarraf wants to merge 1 commit intosbstp:masterfrom
Conversation
Because the assumption that those hard-coded paths are the only
paths a user may have feels wrong.
Also, Because pathlib.Path wasn't resolving ~ to a proper absolute
path.
```
♄ 19:46:51 rrs@priyasi ~ [1] ☸ cs00114-we-01-aks
@ from pathlib import Path
♒︎ 19:46:56 rrs@priyasi ~ ☸ cs00114-we-01-ak s
@ Path("~/.xonshrc")
PosixPath('~/.xonshrc')
⛢ 19:47:16 rrs@priyasi ~ ☸ cs00114-we-01-aks
@ Path("~/.xonshrc").is_file()
False
♅ 19:47:22 rrs@priyasi ~ ☸ cs00114-we-01-aks
@ Path("/home/rrs/.xonshrc").is_file()
True
ॐ 19:47:30 rrs@priyasi ~ ☸ cs00114-we-01-aks
@ $XONSHRC
('/etc/xonsh/xonshrc', '/home/rrs/.config/xonsh/rc.xsh', '/home/rrs/.xonshrc')
⛢ 19:48:21 rrs@priyasi ~ ☸ cs00114-we-01-aks
@ for file in $XONSHRC:
. print(file)
.
/etc/xonsh/xonshrc
/home/rrs/.config/xonsh/rc.xsh
/home/rrs/.xonshrc
````
Closes: sbstp#243
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Because the assumption that those hard-coded paths are the only paths a user may have feels wrong.
Also, Because pathlib.Path wasn't resolving ~ to a proper absolute path.