-
-
Notifications
You must be signed in to change notification settings - Fork 163
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
Implement $_ , the last argument to the previous command run #262
Comments
OK it looks like OSH does nothing, but it's inherited from the parent bash process! bash actually exports it for some reason. Thanks for the report, keep them coming! (Although personally I've never used |
: '\u'
printf '%s\n' "${_@P}" |
#679 depends on it |
FWIW after looking at the neofetch diff, I'm going to concentrate on the word eval quoting problems over this one... There were only 2 usages -- it seems like the first was definitely questionable since you can use An ulterior motivation for not doing this is that I wanted to make In other words, I'm sort of biased against this feature, since I think it makes programs harder to read, and the 10K lines of neofetch didn't dissuade me of that... Still if anyone wants to submit a patch, there are already test cases for it... |
It is true that its uses are totally replaceable. However, the thing is that it is used (it's used several times in the pure bash bible, so even others might use it) and scripts will have to manually support Oil. I suppose it could be fine if @dylanaraps agrees not to use it, though. |
bash treats
$_
as 'the last argument to the previous command run`. I think it's unset for the first command. osh treats this as the name it was invoked with.Expected behaviour:
Actual behaviour:
The text was updated successfully, but these errors were encountered: