727 reputation
312
bio website
location
age
visits member for 2 years, 7 months
seen Mar 18 at 19:22

Feb
15
comment inline conditionals for assignment
I'll be chewing on these for some time... Thanks!
Feb
8
comment Is there a simple way to get array of all arguments that do not begin with a hyphen?
ok, searching online i came across something like nohyph=(${argv##-*}). I'm not sure how robust it is...
Sep
6
comment “globbing” (*) comes from “global command”… Huh?
well, that too, but I was just alluding to the sheer opacity of the name grep. Hmmmm, "sheer opacity": there's an oxymoron for you!
Sep
6
comment “globbing” (*) comes from “global command”… Huh?
Regular expressions seem to be a rich source of Unix conundrums, including the one that has probably scared away, or at least mystified, the most people: grep...
Aug
26
comment Corrupted gnu-screen session not displaying UTF-8 correctly
@n.m.: sorry, that crucial chunk of information got lost in a cut-and-paste shuffle; I've now fixed the error (see UPDATE)
Aug
26
comment Corrupted gnu-screen session not displaying UTF-8 correctly
...In any case, I will set my locale for future sessions, but is there any way to fix the current "corrupted" gnu-screen session?
Aug
26
comment Corrupted gnu-screen session not displaying UTF-8 correctly
@DravSloan (and @StephaneChazelas) in my current configuration for OS X I'm not setting any locale-related variable. I'm not sure why this is, since my configurations for Linux do set LANG and LC_ALL to en_US.utf8. I do remember having spent a few crazy hours some time ago trying to figure out how to set the locale for OS X Lion, and finding copious amounts of contradictory information... My current OS X configuration, despite not setting the locale, does work normally (i.e. fresh gnu-screen sessions work fine)...
Aug
21
comment strange “bad file descriptor” error
Thanks, I've added information to my post that addresses your questions.
Aug
17
comment Absolute path to currently-running zsh?
Thanks! BTW, on my system, the last two gave different answers, because the one given by the second is a symlink; I had to run sudo /bin/ls -l $( whence -p -- ${0#-} ) to get the true path (which then agreed with the results of the lsof approach).
Aug
17
comment zsh and COLUMNS
@StephaneChazelas: Thanks! That certainly takes care of (1). (BTW, this is the reason for my other question, about finding the path the currently-running zsh.)
Aug
16
comment Absolute path to currently-running zsh?
@StephaneChazelas: Darwin; and the ps I'm using above is /bin/ps. For good measure, I ran /bin/ps -p $$, and got the same output as shown above.
Jun
28
comment Standard unix util to split “foo.bar.baz” into “foo.bar” + “.baz”?
Thanks for the clarification... I see that I would need two commands (or one command with two different "modes" of operation), and two calls, to do what I want. And also for the pointer about double-quoting the $rest part.
Jun
26
comment Is there a less convoluted way to set the $path array locally within function?
Thanks! I ran into some problems with your first suggestion; please the latest EDIT to my post.
Jun
26
comment Is there a less convoluted way to set the $path array locally within function?
++Thanks for the pointer, and for editing the many typos in my original post!
May
2
comment /usr/bin/env: zsh -: No such file or directory
@Gilles: I've added a link to my post; that link refers to attacks exploiting shebang lines that use #!/bin/sh, but the same attacks, it seems to me, would be possible with #!/bin/zsh.
Apr
19
comment How can a zsh script test whether it is being sourced?
More specifically, this answer sounds to me like guesswork, which is not what I'm after (I can supply the guesswork myself).
Apr
19
comment How can a zsh script test whether it is being sourced?
The line "These truly abysmal results give me little confidence in this approach" was an attempt to discourage precisely this answer. I guess I should have been blunter about it...
Apr
4
comment Why is `kill -s INT <zsh PID>` behaving differently from `Ctrl-C`?
Thanks, that definitely sheds light on the situation, but there must be more to the issue, because I don't observe the same behavior under all types of Unix. Please see the latest EDIT to my question.
Apr
4
comment Why is `kill -s INT <zsh PID>` behaving differently from `Ctrl-C`?
@Gilles: I've updated my post in response to your comment.
Mar
21
comment How does having /dev/fd make running shell scripts under sudo safe?
That was an education! I think I got almost everything, but you lost me here: some *evil "-i" file that contains for instance just "sh"*. In the last "for instance", did you mean a file that contains the two-character string "sh", or the executable for sh (i.e. a copy of /bin/sh)?