Comments (10)
So here's what I'm thinking.
setup-dorothy will prompt if you want to use xdg if dorothy has not yet been cloned out.
if dorothy has been cloned out, then we check if dorothy is located in the xdg location, if we are then we set DOROTHY_XDG to yes
If dorothy has been cloned out, and we are in setup-dorothy install mode, then we ask if they want to use xdg or not.
In setup-environment-commands we do the same source location check to autoset DOROTHY_XDG to the correct value, and if we are in DOROTHY_XDG mode then that script actively moves everything to the xdg locations and exports the xdg locations.
if we are not in xdg locations, then we check if the xdg location exists, check if the non xdg location exists, and if both exist then we show a prompt to remove one of the offenders, or remove and symlink one of the offenders.
i will also be rewritting setup-dorothy, to just dorothy, of which dorothy setup
is one of its commands, along with dorothy edit
from dorothy.
Need more context.
from dorothy.
basically how would one pass xdg to this:
bash -ilc "$(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/setup-dorothy)"
Edit:
some links:
https://stackoverflow.com/questions/42313918/how-to-pass-variables-in-curl
https://stackoverflow.com/questions/13341955/how-to-pass-a-variable-in-a-curl-command-in-shell-scripting
https://stackoverflow.com/questions/47196581/linux-bash-curl-how-to-pass-variables-to-the-url
I haven't read them but these where some of the results when searching for pass variables to curl
from dorothy.
some other issues have also occured whilst installing on my M1. I am going to document it and post in another issue later.
from dorothy.
In this case, we don't actually want to pass an argument, but pre-set an environment variable:
This may work:
env DOROTHY_XDG=yes bash -ilc "$(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/setup-dorothy)"
Or this:
bash -ilc "export DOROTHY_XDG=yes; $(curl -fsSL https://raw.githubusercontent.com/bevry/dorothy/master/commands/setup-dorothy)"
from dorothy.
Aah allright, i sidn't know what terminology to use.
from dorothy.
oooh what is dorothy edit suppose to do?
okay so I conclude you don't think the user should have an XDG bool in their environment.bash or similar, ie. XDG is only based on what dirs exist and their locations. and one specifies these locations in dorothy setup
. I am just rephrasing to make sure I follow. Because I want to be super sure I am following you before I go off doing stupid shit haha.
dorothy setup
prompts for XDG yes/no.- environmnet paths are being set based on this, ie. home/dorothy -> NO XDG || config/dorothy -> YES XDG.
we don't explicitly set environmnet variable DOROTHY_XDG
. Are there downsides with this I am not aware of?
from dorothy.
I'm tackling the setup changes now, will leave the setup-environment-commands
stuff for you
from dorothy.
Perfect
from dorothy.
Completed via #105 and #94
from dorothy.
Related Issues (20)
- Suggestion: shell-agnostic config files HOT 2
- Suggestion: xonsh support HOT 2
- Bug: File not found: ../themes/trial.nu HOT 1
- Suggestion: elvish support HOT 1
- Suggestion: ion support HOT 2
- Suggestion: use caraspace for cross-shell autocompletion HOT 2
- Suggestion: Dash support HOT 1
- Suggestion: `dorothy revert` HOT 1
- Ongoing: upgrade & integration support HOT 8
- Improvement: `dorothy update` should have less prompts
- Suggestion: nocolor fallbacks for echo-style / enable color for github actions
- Suggestion: merge choose-menu and choose-option
- Suggestion: consider using `brew shellenv`
- Bug: config.bash fails to create new config files HOT 1
- Suggestion: murex support HOT 1
- Bug: app utilities fail very loudly on headless envs
- Improvement: Update workflow, installer, and worker to support PR testing
- Suggestion: dorothy-new command
- Support: experience of nushell on WSL2 HOT 11
- Support: docs give me unclear what to do after install HOT 3
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 dorothy.