From f296fa87a0bf88884c271ff200b1bb36ffbaa103 Mon Sep 17 00:00:00 2001 From: Olaf Alders Date: Wed, 13 Mar 2024 10:30:27 -0400 Subject: [PATCH] Use awk rather than cut in ll function --- bash_functions.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bash_functions.sh b/bash_functions.sh index 942f4906..85b14524 100755 --- a/bash_functions.sh +++ b/bash_functions.sh @@ -149,8 +149,9 @@ rename_tab() { # shellcheck disable=SC2002 ll() { - selection=$(nl -n rz -w2 -s' ' ~/dot-files/launch.txt | fzf --reverse --no-multi) - command=$(echo "$selection" | cut -d' ' -f2-) + file=~/dot-files/launch.txt + selection=$(nl -n rz -w2 -s' ' $file | fzf --reverse --no-multi) + command=$(echo "$selection" | awk -F'# ' '{print $2}') echo "Running $command" eval "$command"