`juju switch -` doesn't switch to previous model

Bug #1988426 reported by Jack Shaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Wishlist
Nicolas Vinuesa

Bug Description

More of a feature request

Lots of cli tools with a navigation aspect use the dash character to navigate back to the previous place. Such as `cd` and `git checkout`

I think it would be great if `juju switch` could do a similar thing!

setup:
```
$ juju models
Controller: lxd

Model Cloud/Region Type Status Machines Units Access Last connection
controller localhost/localhost lxd available 1 1 admin just now
default* localhost/localhost lxd available 3 3 admin 42 seconds ago

$ juju switch controller
lxd:admin/default -> lxd:admin/controller
```

expected (requested) behaviour
```
$ juju switch -
lxd:admin/controller -> lxd:admin/default
```

actual behaviour
```
juju switch -
ERROR model name "admin/-" not valid
```

Revision history for this message
Vitaly Antonenko (anvial) wrote :

Thx Jack,

Sounds reasonable.

Changed in juju:
status: New → Triaged
importance: Undecided → Medium
importance: Medium → Wishlist
milestone: none → 3.0-rc1
milestone: 3.0-rc1 → 3.0.1
tags: added: swi
tags: added: switch
removed: swi
Changed in juju:
milestone: 3.0.1 → 3.0.2
Changed in juju:
milestone: 3.0.2 → 3.0.3
John A Meinel (jameinel)
Changed in juju:
milestone: 3.0.3 → 3.1-beta1
tags: added: bitesize
Changed in juju:
assignee: nobody → Nicolas Vinuesa (nvinuesa)
Changed in juju:
milestone: 3.1-beta1 → 3.1-rc1
Changed in juju:
milestone: 3.1-rc1 → 3.1-rc2
Revision history for this message
Jordan Barrett (barrettj12) wrote :

https://juju.is/docs/olm/juju-stash is related, originally written by Simon IIRC. I'm not sure if it's been tested recently / works with newer versions of Juju.

Changed in juju:
milestone: 3.1-rc2 → 3.1-rc3
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.