sxyazi / yazi

💥 Blazing fast terminal file manager written in Rust, based on async I/O.
https://yazi-rs.github.io
MIT License
16.72k stars 389 forks source link

`cd -` to jump to previous directory #1913

Closed Alex23rodriguez closed 5 days ago

Alex23rodriguez commented 6 days ago

yazi --debug output

Yazi
    Version: 0.3.3 (Homebrew 2024-09-04)
    Debug  : false
    OS     : macos-aarch64 (unix)

Ya
    Version: 0.3.3 (Homebrew 2024-09-04)

Emulator
    Emulator.via_env: ("xterm-256color", "WezTerm")
    Emulator.via_csi: Ok(WezTerm)
    Emulator.detect : WezTerm

Adapter
    Adapter.matches: Iterm2

Desktop
    XDG_SESSION_TYPE           : None
    WAYLAND_DISPLAY            : None
    DISPLAY                    : None
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/bin/zsh")
    EDITOR             : Some("vim")
    VISUAL             : None
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "nvim \"$@\"", block: true, orphan: false, desc: "nvim", for_: None, spread: true })
    block  : Some(Opener { run: "nvim \"$@\"", block: true, orphan: false, desc: "nvim", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : No such file or directory (os error 2)
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file             : 5.41
    ueberzugpp       : No such file or directory (os error 2)
    ffmpegthumbnailer: No such file or directory (os error 2)
    magick           : No such file or directory (os error 2)
    fzf              : 0.55.0
    fd               : 10.2.0
    rg               : 14.1.0
    chafa            : No such file or directory (os error 2)
    zoxide           : No such file or directory (os error 2)
    7z               : No such file or directory (os error 2)
    7zz              : No such file or directory (os error 2)
    jq               : 1.6

--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/Users/alejandro.rodriguez/.local/state/yazi" directory.

Please describe the problem you're trying to solve

cd - to jump to previous directory does not work

Would you be willing to contribute this feature?

Describe the solution you'd like

it is nice that we can map keys to change directory like it says in the docs. However, it would be nice if cd - also worked. this also applies to when typing g<space> and then entering -

Additional context

No response

Validations

sxyazi commented 5 days ago

Just hit H to do that:

https://github.com/sxyazi/yazi/blob/af565fbc40b9d443669db2ab46ee491be323c6fd/yazi-config/preset/keymap.toml#L42-L43

Doc of back and forward:

Closing as already supported