Skip to content

Instantly share code, notes, and snippets.

@well1791
Last active January 30, 2024 08:14
Show Gist options
  • Save well1791/3ffde4622738a21d498c02516e77c01a to your computer and use it in GitHub Desktop.
Save well1791/3ffde4622738a21d498c02516e77c01a to your computer and use it in GitHub Desktop.
reduce dir levels tidy.fish
/// ~/.configh/fish/functions/_tide_pwd.fish
-if set -l split_pwd (string replace -r '^$HOME' '~' -- \$PWD | string split /)
+if set -l split_pwd (string replace -r '^$HOME' '~' -- \$PWD | string split /)[-2..]
// see https://github.com/IlanCosman/tide/issues/428#issuecomment-1765244274
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment