This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

of and oc


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]