recentpopularlog in

kme : weirdness   7

bash - Multi-line, double quoted string triggers history expansion on subsequent single-quoted commands it gets piped to - Stack Overflow | https://stackoverflow.com/
Makes more sense now why things like `echo "Hi there!"` don't work, but `echo "Hi there! "` do.
It is not a bug.

After asking this in the bash-bugs mailing list, I got the following answer:
History expansion is explicitly line-oriented.

It doesn't know about shell state, especially shell quoting state, that spans lines.

It does know about vaguely shell-like quoting that's common across a large set of Unix utilities -- since the history and readline libraries are used outside the shell -- and that a double quote introduces a quoted string in which single quotes are not significant and don't inhibit history expansion.
Upvote for documenting this, but that's insane behavior. – tripleee Jun 20 '16 at 8:42
bash  quoting  historyexpansion  history  weirdness  annoyance  gotcha  solution  fuckina 
november 2017 by kme
bash - echo "#!" fails -- "event not found" - Stack Overflow | https://stackoverflow.com/
The ! character is used for csh-style history expansion.

If you do not use this feature, set +o histexpand (aka set +H) turns off this behavior. It is turned off for scripts, but often enabled for interactive use.

As a workaround, you can use single quotes instead of double quotes.

Except when the single-quoted string is downstream of a double-quoted one in a pipeline as noted in https://stackoverflow.com/a/37917491/785213.
bash  historyexpansion  shellscripting  errormessage  weirdness  annoyance  solution 
november 2017 by kme
Noodlesoft Forums • View topic - Applescripts are altered after Yosemite upgrade
Really weird, but putting it back to the way it was before El Capitan *does* fix the problem:

Applescripts are altered after Yosemite upgrade

Postby leebj7 » Sat May 16, 2015 7:42 am
Hi,

So before my Yosemite upgrade my applescript to add screenshots to evernote looked like this:

Code: Select all
tell application "Evernote"
activate
create note from file theFile notebook {"098 BKamp Images"} tags {"screenshot”}
end tell

but then it switched to this and it won't accept my above applescript:

Code: Select all
tell application "Evernote"
activate
«event EVRNcrnt» given «class kfil»:theFile, «class Ennb»:{"098 BKamp Images"}, «class Engg»:{"screenshot"}
end tell

What am I doing wrong?
solution  mac  osx  automation  applescript  evernote  weirdness  yosemite  elcapitan 
april 2016 by kme
objective c - API documentation: LSOpenURLsWithRole() - Stack Overflow
Dash did this to me once, and rebooting didn't fix it. Reinstalling from the App Store did, however.
mac  osx  errormessage  weirdness 
november 2015 by kme
Cookie exceptions added without my permission • mozillaZine Forums
I found https://github.com/EFForg/privacybadgerfirefox/issues/85 , https://github.com/EFForg/privacybadgerfirefox/issues/103 and https://github.com/EFForg/privacybadgerfirefox/issues/189 which complain that privacy badger added exceptions. 85 is supposedly fixed, 105 is a "won't fix" and 189 claims they "add entries to the cookie exception list as an unintentional side effect but they're not actually getting exempted. If you look at the network requests for Google, there should be no cookies going through." The next to the last comment in https://support.mozilla.org/en-US/questions/1014469 complains that privacy badger added entries to the exceptions.
firefox  cookies  privacy  weirdness  solution  extension 
july 2015 by kme
Passing varargin on to another function in MATLAB | Mem
function y = wrapper(x1,x2,varargin)
y = function(varargin{:});
end
matlab  octave  weirdness  quirks  programming  solution 
april 2013 by kme

Copy this bookmark:





to read