Comments (1)
One way to approach this would be to first check that the domain in question actually exists.
For example:
defaults read com.apple.NetworkBrowser
# yields the full configuration object
# exit value is 0
So, if that exits with 0 and defaults read com.apple.NetworkBrowser DisableAirDrop
exits with 1, perhaps we should assume that the property DisableAirDrop
just hasn't been set yet (which is the case in your example).
ie:
m airdrop status
# outputs "not previously set"
How to go about it really depends on how robust m-cli
should be. The above is a basic heuristic. Another reason for failure might be that it is both true that the property is not set in the plist AND it's an unreferenced property (IE, it's a property that isn't used by any program, which would be the case for misspelled properties).
Personally, I would go with the simple solution for now
EDIT: grammar
from m-cli.
Related Issues (20)
- m bluetooth command doesn't work HOT 2
- iTunes commands not working on macOS 10.15.6 HOT 4
- Firewall State 2 HOT 6
- Automated test suite
- `m trash status` return incorrect content info
- wallpaper command only sets wallpaper for current desktop HOT 2
- set wallpaper to hex color instead of image file HOT 4
- localhost operator uses wrong sed parameter HOT 2
- Fix hard coded default wi-fi interface HOT 2
- We can add more features to DNS plugin HOT 1
- Bash 5.1 errors, unary operator expected HOT 2
- Usage information not following POSIX standard HOT 2
- Headless HOT 1
- Combined itunes play/pause
- AirDrop off disables airdrop even after uninstall
- Roadmap HOT 1
- m bluetooth is not working in apple m1 pro
- m bluetooth is not working in apple m1 pro HOT 2
- Project dead? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from m-cli.