You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Suggestion: exclude history search and history delete when used with additional arguments from history, as their arguments have a high chance of triggering duplication of search terms, e.g. history search foo the first time returns foo correctly, but thereafter returns both foo and history search foo.
history delete also has a high possibility of including sensitive information.
I feel like this has a lot of overlap with #4327, because in both the idea is to provide some mechanism to not save something to history, and that it preferably not be a leading space.
There's a few possible ideas (add a "nohist" decorator, or a special binding that doesn't add it to history, add a function that is run to determine whether something is added to history, actually add $HISTCONTROL and $HISTIGNORE), but I feel like most apply to both?
that gives the power to the author of the function, not the user
it's only for the case where you know beforehand
it's for one function, no matter what the arguments are - what if I want to save youtube-dl, except when used with certain sites. Or if I want to save rm, except in certain directories?
it's not easy to override temporarily - what if I want to save this one history delete ?
Yes, my primary motivation for this was data leaks via history delete but I purposely filed this as a separate issue from the "no history" option as I think it could be resolved on its own immediately and without too much controversy.
I think it could be resolved on its own immediately and without too much controversy.
@mqudsi: What do you propose? Hard-coding, in C++, that we don't save history if the commandline starts with "history", or "history delete" and "history search"?
@zanchey on the flipside, history can be made to not emit any commands starting with history which is a lot less magic, but I think the reduced transparency in that choice makes the former suggestion more palatable.
Activity
faho commentedon Jan 5, 2019
history deletealso has a high possibility of including sensitive information.I feel like this has a lot of overlap with #4327, because in both the idea is to provide some mechanism to not save something to history, and that it preferably not be a leading space.
There's a few possible ideas (add a "nohist" decorator, or a special binding that doesn't add it to history, add a function that is run to determine whether something is added to history, actually add $HISTCONTROL and $HISTIGNORE), but I feel like most apply to both?
j-f1 commentedon Jan 5, 2019
function --no-historycould be an APIfaho commentedon Jan 5, 2019
Or that, but
that gives the power to the author of the function, not the user
it's only for the case where you know beforehand
it's for one function, no matter what the arguments are - what if I want to save youtube-dl, except when used with certain sites. Or if I want to save rm, except in certain directories?
it's not easy to override temporarily - what if I want to save this one
history delete?mqudsi commentedon Jan 5, 2019
Yes, my primary motivation for this was data leaks via
history deletebut I purposely filed this as a separate issue from the "no history" option as I think it could be resolved on its own immediately and without too much controversy.faho commentedon Jan 5, 2019
@mqudsi: What do you propose? Hard-coding, in C++, that we don't save history if the commandline starts with "history", or "history delete" and "history search"?
mqudsi commentedon Jan 6, 2019
Some version of that, yes. As ugly as it sounds.
zanchey commentedon Jan 11, 2019
That sounds a bit too magic to me.
mqudsi commentedon Jan 13, 2019
@zanchey on the flipside,
historycan be made to not emit any commands starting withhistorywhich is a lot less magic, but I think the reduced transparency in that choice makes the former suggestion more palatable.ridiculousfish commentedon Jan 19, 2019
I'm going to close this, this is too magic as zanchey says. It's better to be predictable.
zanchey commentedon Jan 21, 2019
@mqudsi, that's more palatable - it can be controlled with
--include-historyor similar, perhaps (though the webconfig would need something similar).