Reputation
154,782
Next tag badge:
768/1000 score
208/200 answers
Badges
23 237 421
Newest
 Necromancer
Impact
~8.4m people reached

Dec
19
comment Zsh prompt filling whole width with user input in next line
@danijar, just remove the \n (that \n is not needed because we're at the end of the line and it messes up reset-prompt calculations)
Dec
19
comment Zsh prompt filling whole width with user input in next line
Sorry, I had forgotten to include the zle -N call. Note that $ZLE_STATE would still include insert/overwrite in vi mode, but in vi mode, you'd also need to wrap i, I, a, A, R, s, S, c... or possibly find another way to hook yourself everytime the insert mode is entered.
Dec
19
revised Zsh prompt filling whole width with user input in next line
added 27 characters in body
Dec
19
answered Zsh prompt filling whole width with user input in next line
Dec
19
comment Zsh prompt filling whole width with user input in next line
Is that insert mode the current zle overwrite/insert mode. Do you want the prompt to be redrawn when you change mode?
Dec
19
revised What is the “eval” command in bash?
added 297 characters in body
Dec
19
comment What is the “eval” command in bash?
@BinaryZebra, sed like eval is being passed a string contained in a variable, and for both, the content of that string ends up being evaluated as shell code, so sed is as dangerous as eval, that's what I'm saying. sed is being passed a string containing uname (uname has not been executed so far) and through the invocation of sed, the uname command ends up being executed. Like for eval. In sed 's/foo/$a/g', you're not passing unsanitized data to sed, that's not what we're talking about here.
Dec
19
awarded  Enlightened
Dec
19
awarded  Nice Answer
Dec
18
comment What's the intended use case for COMPLETE_ALIASES in zsh?
the documentation is pretty clear on what one might want to use that option for. What else would you expect from an answer here?
Dec
18
comment How to ONLY print the number that is being produced from du -sh /home?
Tab is the default delimiter for cut, so cut -f1 is enough.
Dec
18
comment Can I mark _current_ memory contents as non swappable?
On Linux at least, the amount of memory you can mlock is limited (see ulimit -l with bash), to 64KiB in my case, so you'd need to raise that limit first or that would only work for processes running as root. That would also mean loading all pages from disk including the full content of mmapped files (like the dead code of executables)
Dec
18
revised Why GNU find -execdir command behave differently than BSD find?
added 437 characters in body
Dec
18
revised Why GNU find -execdir command behave differently than BSD find?
added 204 characters in body
Dec
18
comment Find out most frequent strings in section of file
What Linux is that? ChromeOS, Android, OpenWRT, Ubuntu or other GNU based system? The kernel has little incidence here on this Q&A.
Dec
18
revised Find out most frequent strings in section of file
added 62 characters in body
Dec
18
comment Why GNU find -execdir command behave differently than BSD find?
@kenorb, I've raised the issue about errors about executing commands on the austin-group mailing list
Dec
18
comment Avoid the contents of a .tar begin with './'
@schily, what Linux distribution uses that? AFAIK, that implementation never went out of "alpha" status. I don't see any reference to GNU paxutils in schily-2015-12-16/star/README.otherbugs
Dec
18
comment Why the dot in find commands?
So would a script that would rely on find "!" -print to process the file or directory called "!".
Dec
18
revised Why GNU find -execdir command behave differently than BSD find?
added 1079 characters in body