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

Trouble with sudo completion. #2

Open
sorin-ionescu opened this issue Jan 1, 2010 · 3 comments
Open

Trouble with sudo completion. #2

sorin-ionescu opened this issue Jan 1, 2010 · 3 comments

Comments

@sorin-ionescu
Copy link

BASH completion for "sudo foo" works as expected when the "foo" completion is provided by the bash_completion package or written manually with the BASH completion API.

However, it refuses to work for completions generated by Compleat.
sudo open[tab] results in the error bellow:

sudo open -bash: compgen: warning: -C option may not work as you expect
compleat: : openFile: does not exist (No such file or directory)
/Users/sorin/.compleat/open.usage

This is my open.usage for the Mac OS X open command:
open [-a (|) | -b | -e | -t | -R | --reveal | -f];
open [-a ] [-g | --background | -n | --new | -W | --wait-apps] [--args] ;
open [-h | --header ];
application = !mdfind 'kMDItemKind == Application' | awk 'BEGIN {FS=OFS="/"} {print $NF}' | sed 's/ /\ /g';
identifier = !mdfind 'kMDItemKind == Application' | sed -e 's/ /\ /g' -e "s:':\':g" | xargs -n 1 mdls | grep 'kMDItemCFBundleIdentifier' | cut -d '=' -f 2 | sed 's/^ "(.*)"$/\1/g'

@sorin-ionescu
Copy link
Author

I forgot to mention that despite what Compleat says, the file exists. It works fine when "sudo" is not prepended.

@mbrubeck
Copy link
Owner

mbrubeck commented Jan 4, 2010

Thanks for the report! This is definitely a bug in compleat, and I'll try to fix it. Thanks for the open.usage file, too.

@sorin-ionescu
Copy link
Author

Thank you. If you are also on Mac, could you please provide a binary download? Thank you. Compleat is awesome.

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

No branches or pull requests

2 participants