Keep Track of Directories on the Terminal - bash `cd` stack

Поделиться
HTML-код
  • Опубликовано: 4 янв 2025

Комментарии • 13

  • @yousuckatprogramming
    @yousuckatprogramming  3 месяца назад +11

    For anyone curious why I didn't use `pushd`/`popd`/`dirs` as the underlying datastore - when I wrote this about ~10 years ago now I was involved with a coding project at that time that required you to source an "environment" file that hijacked `pushd`, `popd`, etc. and used them under-the-hood. I wanted something of my own to manage my own personal stack of dirs without worrying about modifying the internal Bash `dirs` storage... so `bash-cdstack` was born.

    • @two_number_nines
      @two_number_nines 3 месяца назад

      this much overwriting makes me so anxious that i'd try to compile a custom cd instead

  • @C0MPUTERPHILE
    @C0MPUTERPHILE 2 месяца назад +2

    Only negative thing about this is that I didn't know about this 10 years ago

  • @wviana852
    @wviana852 3 месяца назад

    Why (( to check ret as number instead of [[ -eq or [[ -gt or something else test.

  • @mantas9327
    @mantas9327 3 месяца назад

    Does not work that well with zoxide unfortunately.

  • @dv_xl
    @dv_xl 3 месяца назад

    The vim default colors dont really look so good on my phone with night light. Not sure if youre concerned about that, just a heads up

    • @patricklarose
      @patricklarose 3 месяца назад

      Nothing looks good with night light.

    • @dv_xl
      @dv_xl 3 месяца назад +1

      I tried without but still looked difficult to read. It's that harsh blue against the black.

    • @rogo7330
      @rogo7330 3 месяца назад

      Dark colors in terminal on a black are in general ass. Sometimes I just hate syntax highlighting and turn off it, just reading white text.

  • @johnhupperts
    @johnhupperts 3 месяца назад

    Succinct script. Nice

  • @stargazer7644
    @stargazer7644 3 месяца назад +1

    "cd -" does the same thing as "b", and it's built in.

    • @yousuckatprogramming
      @yousuckatprogramming  3 месяца назад +7

      they’re different - try running those commands twice and see where you end up