sp = "!echo name && read name"
I've added this to my aliases list. When I run it "name" is printed as expected and I can input something into read; but on carriage returning and trying echo $name
, nothing's there.
It works fine when I directly run the command in the terminal and whatever I type in gets stored in $name
.
I also have another problem which was the first one and I was trying to simplify it as much as I can to zone in on the issue above but here's the original:
sp = "!read branch\"?Branch Name: \""
Whenever I run this via git sp
, I get the error
read branch"?Branch Name:": line 0: read: `branch?Branch Name:': not a valid identifier
Copy pasting the first bit of the error which is the command text into the terminal and directly running it works perfectly so it can't be some sort of invalid hidden character somewhere tho I can't be certain how git is replacing stuff.
I'm on macos monterey using terminal.app and zsh. Thank you.