1,850 reputation
1332
bio website
location
age
visits member for 3 years, 11 months
seen 8 hours ago

Dec
10
comment Why is $COLUMNS not listed by either env or set? (on zsh)
aha: set | grep --text COLUMNS gives it to me. If you post an answer with as much explanation as you can (or as is reasonable, if you could write volumes), I'll accept it.
Dec
10
comment Why is $COLUMNS not listed by either env or set? (on zsh)
zsh --version gives me zsh 5.0.2 (x86_64-apple-darwin13.0). I quadruple checked, but I'm not getting it.
Nov
19
comment how to run multiple versions of one shell on a single machine
Okay... they have parametric aliases, but the syntax is a %!#&$. I'm trying to get one working, in another question.
Nov
19
comment how to run multiple versions of one shell on a single machine
I was just working on a function for csh and tcsh that would add export to it for compatibility with everything else, and discovered that they lack functions. Okay, csh and tcsh may be so prehistoric that it's completely worthless to try to support them. I never encounter them being used and haven't used either myself since about 15 years ago.
Nov
18
comment how to run multiple versions of one shell on a single machine
@glennjackman: If you mean do I have access, then yes. I created these VMs so I have root access. But it's not immediately obvious to me just how I'd implement this.
Nov
18
comment how to run multiple versions of one shell on a single machine
@MarkPlotnick: any path should be okay, as long as it's not horribly difficult to switch between them.
Nov
18
comment Is there an alternative to the `which` command?
I would regard any shell without either test or [...] as unusable for any but the most limited purposes.
Nov
17
comment What is the most portable syntax for `if` statements?
I didn't notice anyone dealing with if test either... but perhaps I just missed it.
Nov
17
comment What is the most portable syntax for `if` statements?
@MichaelDurrant: excellent. After reading muru's answer I realized your question (and maybe mine too) dealt with both issues without specifically delineating them. I thought of commenting to that effect there, but I'm glad you noticed it too and took action first. Thanks!
Nov
17
comment What is the most portable syntax for `if` statements?
Aha: now the syntax actually makes sense... I don't think anyone dealt with if /bin/test as one of the examples in the answers to the other question. Your answer seems to fill in the missing details quite nicely. Thanks!
Nov
17
comment Are there problems with hyphens in functions, aliases, and executables?
Thanks. I tested later in csh and tcsh and they don't support hyphens either, but Korn shell did. It's slightly funny that I used a-b() as my function name as well.
Nov
16
comment Are there problems with hyphens in functions, aliases, and executables?
Useful info: this confirms there's a risk, but is there any known case of a concrete problem?
Oct
17
comment How to transpose command line arguments with emacs keybindings?
Your simple approach seems to work, except that I think you meant control (or Ctrl on Windows keyboards) rather than Alt.
Oct
17
comment How to transpose command line arguments with emacs keybindings?
Thanks, but if I can't have a command that handles whole arguments, then it'll actually be a lot more complicated than that. I updated the examples to be closer to real life, with punctuation.
Oct
17
comment How to transpose command line arguments with emacs keybindings?
Thanks, but if I can't have a command that handles whole arguments, then it'll actually be a lot more complicated than that. I updated the examples to be closer to real life, with punctuation.
Aug
1
comment Succinct way to respond to user input?
Yes: if I change the name of the function to something like user_input then the resulting code reads quite nicely.
Aug
1
comment How to execute a remote command and pass in local file as input?
Okay, I thought you were taking this approach instead of < since you thought writing was required (as was implied by the original title) but you were simply offering another way of doing it (which just happens to allow writing as a side effect).
Aug
1
comment How to execute a remote command and pass in local file as input?
Okay, I must have misunderstood your answer. I didn't try it, but inferred that since you were establishing a reverse tunnel (from remote to local host?) you were allowing the local file to be modified by the remote machine. Is that not the case?
Aug
1
comment How to execute a remote command and pass in local file as input?
@Gilles: I think the original title was misleading, and you understood his question based on the misleading title. As far as I can tell, thought, he didn't actually want to act on the local file, but just pass it in as input. (But your answer is amazing, if I understand it correctly! Maybe I should ask the question you answered, just to give you a place to put the answer where you'll get proper credit for it.) I've edited the questions title to make it consistent with the body and with the chosen answer.
Jul
31
comment Variable assignment outside of case statement
One page I checked (I don't recall where it was) listed the opening ( as optional. I thought it might help avoid letting the ) be misinterpreted as the closing ) for the $(...) expression.