{"action":"created","issue":{"url":"https://api.github.com/repos/rupa/z/issues/162","labels_url":"https://api.github.com/repos/rupa/z/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/rupa/z/issues/162/comments","events_url":"https://api.github.com/repos/rupa/z/issues/162/events","html_url":"https://github.com/rupa/z/issues/162","id":109049067,"number":162,"title":"Make use of pushd","user":{"login":"jomo","id":3585743,"avatar_url":"https://avatars.githubusercontent.com/u/3585743?v=3","gravatar_id":"","url":"https://api.github.com/users/jomo","html_url":"https://github.com/jomo","followers_url":"https://api.github.com/users/jomo/followers","following_url":"https://api.github.com/users/jomo/following{/other_user}","gists_url":"https://api.github.com/users/jomo/gists{/gist_id}","starred_url":"https://api.github.com/users/jomo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jomo/subscriptions","organizations_url":"https://api.github.com/users/jomo/orgs","repos_url":"https://api.github.com/users/jomo/repos","events_url":"https://api.github.com/users/jomo/events{/privacy}","received_events_url":"https://api.github.com/users/jomo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-09-30T09:26:49Z","updated_at":"2016-01-27T19:27:01Z","closed_at":null,"body":"It would be useful to go back to the previous directory.\r\nThat's exactly what `pushd` and `popd` are made for, but `z` doesn't use them.\r\n\r\nIf `z` would automatically use `pushd`, you could actually \"jump around, jump up _and get down_\" by e.g. `z -b` (which would just run `popd`).\r\n\r\n### Example\r\n\r\n```shell\r\n# pwd\r\n/home/johndoe\r\n# z foo; pwd\r\n/var/lib/foo\r\n# z -b; pwd\r\n/home/johndoe\r\n```"},"comment":{"url":"https://api.github.com/repos/rupa/z/issues/comments/175810820","html_url":"https://github.com/rupa/z/issues/162#issuecomment-175810820","issue_url":"https://api.github.com/repos/rupa/z/issues/162","id":175810820,"user":{"login":"dimitriye98","id":1576330,"avatar_url":"https://avatars.githubusercontent.com/u/1576330?v=3","gravatar_id":"","url":"https://api.github.com/users/dimitriye98","html_url":"https://github.com/dimitriye98","followers_url":"https://api.github.com/users/dimitriye98/followers","following_url":"https://api.github.com/users/dimitriye98/following{/other_user}","gists_url":"https://api.github.com/users/dimitriye98/gists{/gist_id}","starred_url":"https://api.github.com/users/dimitriye98/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dimitriye98/subscriptions","organizations_url":"https://api.github.com/users/dimitriye98/orgs","repos_url":"https://api.github.com/users/dimitriye98/repos","events_url":"https://api.github.com/users/dimitriye98/events{/privacy}","received_events_url":"https://api.github.com/users/dimitriye98/received_events","type":"User","site_admin":false},"created_at":"2016-01-27T19:27:01Z","updated_at":"2016-01-27T19:27:01Z","body":"I'd prefer it not to auto `pushd`. I tend to use `pushd` and `popd` for short diversions, e.g. moving from a source directory to a build directory, and having it automatically do it every time would be bothersome.\r\n\r\nIn fact, my `.zshrc` actually has:\r\n```sh\r\npushz() {pushd `z -e $@`}\r\nalias pz=pushz\r\n```\r\nso that I can do just that when I want to jump."}}