Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lfcd () {
- tmp="$(mktemp)"
- lf -last-dir-path="$tmp" "$@"
- if [ -f "$tmp" ]; then
- dir="$(cat "$tmp")"
- rm -f "$tmp"
- [ -d "$dir" ] && [ "$dir" != "$(pwd)" ] && cd "$dir"
- fi
- }
- bindkey -s '^[o' "lfcd^m"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement