Closed tengstrand closed 2 weeks ago
Add support for switching workspace via shortcuts that are specified in the :ws-shortcuts key in the user config file ~/.config/polylith/config.edn (the value of :root-dir is added to the paths), e.g.:
:ws-shortcuts
:root-dir
{... :ws-shortcuts {:root-dir "/Users/joakimtengstrand/source/polylith" :paths [{:dir "examples/doc-example"} {:dir "examples/multiple-workspaces2/backend"} {:dir "../clojure-polylith-realworld-example-app" :name "realworld"} {:file "../sandbox/another-ws.edn"}] }
Now we can switch workspace with via:NAME where NAME is the name of the directory/file, or :name if given, e.g.:
via:NAME
:name
polylith$ switch-ws via: backend (examples/multiple-workspaces2/backend) doc-example (examples/doc-example) realworld (../clojure-polylith-realworld-example-app) another-ws (../sandbox/another-ws.edn)
If we for example select realworld then the tool will perform a switch-ws dir:../clojure-polylith-realworld-example-app for us:
realworld
switch-ws dir:../clojure-polylith-realworld-example-app
polylith$ switch-ws via:realworld dir:clojure-polylith-realworld-example-app$
We can always switch back to the root workspace with:
dir:clojure-polylith-realworld-example-app$ switch-ws polylith$
It's also possible to switch to a workspace that has been exported to a file:
polylith$ switch-ws via:another-ws file:another-ws$
Add support for switching workspace via shortcuts that are specified in the
:ws-shortcuts
key in the user config file ~/.config/polylith/config.edn (the value of:root-dir
is added to the paths), e.g.:Now we can switch workspace with
via:NAME
where NAME is the name of the directory/file, or:name
if given, e.g.:If we for example select
realworld
then the tool will perform aswitch-ws dir:../clojure-polylith-realworld-example-app
for us:We can always switch back to the root workspace with:
It's also possible to switch to a workspace that has been exported to a file: