This commit is contained in:
parent
b44bbef3e2
commit
21d9ca8737
8 changed files with 4 additions and 112 deletions
|
@ -1,37 +0,0 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
with pkgs;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
pname = "tmux-sessionizer";
|
||||
version = "unstable-2025-06-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "theprimeagen";
|
||||
repo = "tmux-sessionizer";
|
||||
rev = "7edf8211e36368c29ffc0d2c6d5d2d350b4d729b";
|
||||
sha256 = "sha256-4QGlq/cLbed7AZhQ3R1yH+44gmgp9gSzbiQft8X5NwU=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
bash
|
||||
fzf
|
||||
tmux
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out/bin
|
||||
cp tmux-sessionizer $out/bin/tmux-sessionizer
|
||||
chmod +x $out/bin/tmux-sessionizer
|
||||
'';
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "Sort directories alphabetically #23";
|
||||
sha256 = "sha256-AtaOlV2JSeR0BmDsfuv8ZFbu5G0vz4RdUPY4ZF4UqQc=";
|
||||
url = "https://patch-diff.githubusercontent.com/raw/ThePrimeagen/tmux-sessionizer/pull/23.patch";
|
||||
})
|
||||
|
||||
./shorten-paths.patch
|
||||
];
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
diff --git a/tmux-sessionizer b/tmux-sessionizer
|
||||
index 036d2a3..cd11500 100755
|
||||
--- a/tmux-sessionizer
|
||||
+++ b/tmux-sessionizer
|
||||
@@ -252,7 +252,7 @@ find_dirs() {
|
||||
if [[ -d "$path" ]]; then
|
||||
while IFS= read -r dir; do
|
||||
dir_list+=("$dir")
|
||||
- done < <(find "$path" -mindepth 1 -maxdepth "$depth" -path '*/.git' -prune -o -type d -print)
|
||||
+ done < <(find "$path" -mindepth 1 -maxdepth "$depth" -path '*/.git' -prune -o -type d -print | sed "s#$HOME/##" )
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -341,6 +341,9 @@ fi
|
||||
|
||||
if [[ "$selected" =~ ^\[TMUX\]\ (.+)$ ]]; then
|
||||
selected="${BASH_REMATCH[1]}"
|
||||
+else
|
||||
+ # Re-add the Home directory back to the selected path.
|
||||
+ selected="$HOME/$selected"
|
||||
fi
|
||||
|
||||
selected_name=$(basename "$selected" | tr . _)
|
Loading…
Add table
Add a link
Reference in a new issue