zsh-users
 help / color / mirror / code / Atom feed
* turning off backslash expansion
@ 2017-08-21 23:08 Filipe Silva
  2017-08-21 23:11 ` Radon Rosborough
  0 siblings, 1 reply; 2+ messages in thread
From: Filipe Silva @ 2017-08-21 23:08 UTC (permalink / raw)
  To: Zsh Users

[-- Attachment #1: Type: text/plain, Size: 432 bytes --]

Hi,

I want to write a zsh function that takes in a windows path and prints out
a unix path from it.

$ myfunc c:\Users\userblah\Desktop\myfile.txt
  /c/Users/userblah/Desktop/myfile.txt

The problem is that when I'm using the function, zsh already tried to
interpret the backslash as a escape for the next char. How do I momentarily
turn this off so that I can perform my sed regex on the $1 variable?

thanks in advance,

Filipe.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: turning off backslash expansion
  2017-08-21 23:08 turning off backslash expansion Filipe Silva
@ 2017-08-21 23:11 ` Radon Rosborough
  0 siblings, 0 replies; 2+ messages in thread
From: Radon Rosborough @ 2017-08-21 23:11 UTC (permalink / raw)
  To: Filipe Silva; +Cc: Zsh Users

As far as I know, there's no way to achieve this automagically. You're
just going to have to quote the argument:

$ myfunc 'c:\Users\userblah\Desktop\myfile.txt'


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-08-21 23:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-21 23:08 turning off backslash expansion Filipe Silva
2017-08-21 23:11 ` Radon Rosborough

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).