withfig / fig

Public issue tracker for Fig.
https://fig.io
MIT License
2.04k stars 63 forks source link

Export dotfiles #1569

Open chungweileong94 opened 2 years ago

chungweileong94 commented 2 years ago

Sanity checks

Feature Details

Description:

It would be good if we can have an option to export the dotfiles configuration.

Use-cases:

clo4 commented 2 years ago

Hey @chungweileong94, thanks for the request!

Should be pretty easy to implement this. For now, you can use a couple methods to get the compiled shell code, here's the easiest if you have jq installed:

cat ~/Library/Application\ Support/fig/shell/zsh.json | jq .dotfile --raw-output

You can also replace zsh.json with bash.json or fish.json if you use a different shell.

The other way would be to run fig init <SHELL> post and copy/paste from the top of the output. These are equivalent :)

chungweileong94 commented 2 years ago

Hey @chungweileong94, thanks for the request!

Should be pretty easy to implement this. For now, you can use a couple methods to get the compiled shell code, here's the easiest if you have jq installed:

cat ~/Library/Application\ Support/fig/shell/zsh.json | jq .dotfile --raw-output

You can also replace zsh.json with bash.json or fish.json if you use a different shell.

The other way would be to run fig init <SHELL> post and copy/paste from the top of the output. These are equivalent :)

Thanks! Was figuring out where fig stores the dotfiles value.

NerdCowboy commented 8 months ago

an export feature would be super helpful since y'all are shutting down