Skip to content

Commit

Permalink
Use awk rather than cut in ll function
Browse files Browse the repository at this point in the history
  • Loading branch information
oalders committed Mar 13, 2024
1 parent 2d16bb6 commit f296fa8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions bash_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit f296fa8

Please sign in to comment.