Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Variable expansion problem



I'd like to have a mechanism such that I can type $FOO<TAB> and have it expand to the following which I can then manually edit further:
"C:\Program Files (x86)\Citrix\Web Interface\5.0.0\sitemgr.exe" -c "WIDest=1:/Citrix/AccessPlatform,Config=Local,XMLService=beanstalk:80"

I've tried:
PF="C:\Program Files (x86)"
FOO="$PF\Citrix\Web Interface\5.0.0\sitemgr.exe -c \"WIDest=1:/Citrix/AccessPlatform,Config=Local,XMLService=beanstalk:80\""

.. but this expands the value into a single escaped string:
$ C:\\Program\ Files\ \(x86\)\\Citrix\\Web\ Interface\\5.0.0\\sitemgr.exe\ -c\ \"WIDest=1:/Citrix/AccessPlatform,Config=Local,XMLService=beanstalk:80\"

If I try `setopt shwordsplit' (which I don't really want), the spaces in the expanded path are no longer quoted causing the cmd to fail:
C:\\Program Files \(x86\)\\Citrix\\Web Interface\\5.0.0\\sitemgr.exe -c \"WIDest=1:/Citrix/AccessPlatform,Config=Local,XMLService=beanstalk:80\" 
zsh: command not found: C:\Program

I also don't want the double-quotes to be quoted in the expansion.


Any ideas how to do this?

Thanks,

    --- John 



Messages sorted by: Reverse Date, Date, Thread, Author