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

Possible solution for transparently passing in zeroth argument #5

Closed

Conversation

Rutherther
Copy link
Contributor

One possible fix for #4. Passes in zeroth argument with path to the shell the shell file is a link to, Additionally, if the zeroth argument to noshell starts with -, it's passed through.

This still has one issue, though. For example, when using home-manager to put the symlink, with
xdg.configFile.shell.source = lib.getExe pkgs.zsh;, the actual link is going to be from nix store home-manager files. I am not sure what the best solution for this is. One would be to just get the final filename with realpath, but that has other issues - if one indeed wanted to emulate bash with symlinking zsh to bash, you will not get that behavior as zsh will be the zeroth argument!

@Rutherther
Copy link
Contributor Author

I've realized I don't check the lstat return value, but it could fail. That will have to be addressed, I will update the code at most during tomorrow.

@Rutherther Rutherther force-pushed the fix/transparent-zeroth-argument branch from 48ce746 to 21d6b69 Compare May 16, 2024 06:52
@Rutherther
Copy link
Contributor Author

I've realized I don't check the lstat return value, but it could fail. That will have to be addressed, I will update the code at most during tomorrow.

Fixed, hopefully.

viperML added a commit that referenced this pull request May 16, 2024
@viperML viperML closed this in #8 May 16, 2024
@viperML viperML closed this in 03e31c7 May 16, 2024
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

Successfully merging this pull request may close these issues.

1 participant