summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-10-05 21:57:32 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-10-05 21:57:32 +0200
commit9d85e9009c62f1edc6ec5daaee0e07fe3c9a02e2 (patch)
treec21fd3d3c309255684e1b45cef5fb1a55cfc065c
parente9aec353ce8807b204b95638d6f5a50d65706dbe (diff)
bash: Use more idiomatic bash syntax
-rw-r--r--.bashrc13
1 files changed, 7 insertions, 6 deletions
diff --git a/.bashrc b/.bashrc
index eb2bf20..0d0c74d 100644
--- a/.bashrc
+++ b/.bashrc
@@ -4,12 +4,13 @@
[[ $- != *i* ]] && return
[[ -f /etc/bashrc ]] && . /etc/bashrc
-jr() {
- local dir
- dir=`find "$REPODIR" -maxdepth 2 -path "$REPODIR/*/*" -printf '%P\n' \
- | sort -r \
- | fzf -q "$1"`
- [ -n "$dir" ] && cd "$REPODIR/$dir"
+function jr {
+ local dir=`
+ find "$REPODIR" -maxdepth 2 -path "$REPODIR/*/*" -printf '%P\n' \
+ | sort -r \
+ | fzf -q "$1"
+ `
+ [[ -n "$dir" ]] && cd "$REPODIR/$dir"
}
export BROWSER="firefox"