Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wi_script fails for Actions which are also variables #40

Closed
GoogleCodeExporter opened this issue Jul 16, 2015 · 1 comment
Closed

wi_script fails for Actions which are also variables #40

GoogleCodeExporter opened this issue Jul 16, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create a $home/.wmii-3.5/status script
2. Undefine Action-status and status functions in rc.wmii.local
3. Rerun rc.wmii

What is the expected output? What do you see instead?

 Expect to the custom status script to run, instead I get the error:
rc: line 2: token '=': syntax error

What version of the product are you using (wmii -v)? On what operating system?

wmii-20080520, ©2007 Kris Maglione

Please provide any additional information below.

 Problem is the trailing space in grep's regex in wi_script, which causes
it to not match the status='' line output from whatis. Pretty sure I fixed
the same problem in rc.wmii in the past...

fn wi_script {
    noprog=true prog=() {
        if(~ $1 -f) {
            shift
            noprog=/dev/null
        }
        prog = `{rc -c 'path=$confpath whatis '$1 >[2]/dev/null \
            | grep -v '^fn|= ' || echo $noprog}
        shift; echo $prog $*}
}

-sqweek

Original issue reported on code.google.com by sqw...@gmail.com on 29 May 2008 at 4:47

@GoogleCodeExporter
Copy link
Author

Ach. The space was supposed to be after 'fn'. Should be fixed as of 
2332:a948e29c80d6.

Original comment by maglion...@gmail.com on 29 May 2008 at 9:29

  • Changed state: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant