summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
authorAhmed ElSamhaa <ahmed.elsamha@vaimo.com>2023-06-26 20:51:32 +0300
committerAhmed ElSamhaa <ahmed.elsamha@vaimo.com>2023-06-26 20:51:32 +0300
commit5a637cc1ab7373e62d9a04464627881ccf9d8c06 (patch)
tree7fc73294ef684c880bca3250eb50b05597ac35ef /README.md
parent28ce661edf8c2201808a5f830db52696ae682ebc (diff)
Adds a toggle to the config to match the exit keybinding behavior of vim
- Now ZZ does not mutate the current cwd by default, while ZQ does
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 5 insertions, 4 deletions
diff --git a/README.md b/README.md
index d9e3eba..59619cf 100644
--- a/README.md
+++ b/README.md
@@ -100,7 +100,7 @@ cargo install --path .
## Integrations
-In order for the shortcut `ZZ` to work, you need to add the following to your `.bashrc` or `.zshrc`
+In order for the keybinding `ZZ` to work, you need to add the following to your `.bashrc` or `.zshrc`
or an equivalent depending on your (POSIX) shell:
```sh
@@ -115,12 +115,13 @@ eval "$(
fi
mkdir -p "$runtime_dir"
+ # Option differences between BSD and GNU find implementations
case "$(uname)" in
Linux)
- cleanup_lwd='find "$RUNTIME_DIR" -type f -and \( -mmin +$(echo 1/60 | bc -l) -or -name $$ \) -delete'
+ file_age_option='-mmin +$(echo 1/60 | bc -l)'
;;
Darwin)
- cleanup_lwd='find "$RUNTIME_DIR" -type f -and \( -mtime +1s -or -name $$ \) -delete'
+ file_age_option='-mtime +1s'
;;
*) ;;
esac
@@ -135,7 +136,7 @@ fx() {
fi
# Finally, clean up current and leftover lwd files
- $cleanup_lwd
+ find "\$RUNTIME_DIR" -type f -and \( $file_age_option -or -name \$\$ \) -delete
}
EOF
)"