* of and oc
@ 2009-06-04 3:40 Haojun Bao
2009-06-04 8:28 ` Corinna Vinschen
0 siblings, 1 reply; 2+ messages in thread
From: Haojun Bao @ 2009-06-04 3:40 UTC (permalink / raw)
To: cygwin
cygstart is so useful that I want type less keys:
alias of=cygstart #on cygwin-1.5
or:
function of ()
{
if which "$1" > /dev/null 2>&1; then
if [[ "$1" == of ]]; then
local file=`which cygstart`;
else
local file="`which \"$1\"`";
fi;
shift;
cygstart "$file" "$@";
else
cygstart "$@";
fi
} #on cygwin-1.7, because we must specify full path now
oc is my name for `open containing folder', and I peeked into source of
Firefox to write it:
function oc ()
{
cygstart `which explorer.exe` /n,/select,\""`cygpath -alw \"$1\"`"\"
}
It won't work for non-ascii file names though, as a Chinese, I feel
a bit sorry for that
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: of and oc
2009-06-04 3:40 of and oc Haojun Bao
@ 2009-06-04 8:28 ` Corinna Vinschen
0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2009-06-04 8:28 UTC (permalink / raw)
To: cygwin
On Jun 4 11:40, Haojun Bao wrote:
> cygstart is so useful that I want type less keys:
>
> alias of=cygstart #on cygwin-1.5
>
> or:
>
> function of ()
> {
> if which "$1" > /dev/null 2>&1; then
> if [[ "$1" == of ]]; then
> local file=`which cygstart`;
> else
> local file="`which \"$1\"`";
> fi;
> shift;
> cygstart "$file" "$@";
> else
> cygstart "$@";
> fi
> } #on cygwin-1.7, because we must specify full path now
>
> oc is my name for `open containing folder', and I peeked into source of
> Firefox to write it:
>
> function oc ()
> {
> cygstart `which explorer.exe` /n,/select,\""`cygpath -alw \"$1\"`"\"
> }
>
> It won't work for non-ascii file names though, as a Chinese, I feel
> a bit sorry for that
Did you read http://cygwin.com/1.7/cygwin-ug-net/setup-locale.html?
Does it help? I assume that cygstart itself isn't yet locale-aware.
This is all quite new. Give us package maintainers a bit of time.
Corinna
--
Corinna Vinschen Please, send mails regarding Cygwin to
Cygwin Project Co-Leader cygwin AT cygwin DOT com
Red Hat
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-06-04 8:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-04 3:40 of and oc Haojun Bao
2009-06-04 8:28 ` Corinna Vinschen
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 read-only IMAP folder(s) and NNTP newsgroup(s).