From 12ce9451ee1c24ad245d33e8944ba77a1108b5b2 Mon Sep 17 00:00:00 2001 From: Arun Prakash Jana Date: Thu, 18 Apr 2019 19:41:39 +0530 Subject: Move nlaunch from user-scripts --- scripts/nlaunch/nlaunch | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100755 scripts/nlaunch/nlaunch (limited to 'scripts') diff --git a/scripts/nlaunch/nlaunch b/scripts/nlaunch/nlaunch new file mode 100755 index 0000000..18d0f8b --- /dev/null +++ b/scripts/nlaunch/nlaunch @@ -0,0 +1,20 @@ +#!/usr/bin/env sh + +# Description: Fuzzy find executables in $PATH and launch an application. +# stdin, stdout, stderr are suppressed so CLI utilities exit silently. +# Works as an independent app launcher. +# +# Requires fzy. +# +# Shell: POSIX compliant +# Author: Arun Prakash Jana + +IFS=':' + +get_selection() { + ls -H $PATH | sort | fzy +} + +if selection=$( get_selection ); then + "$selection" 2>/dev/null 1>/dev/null & +fi -- cgit v1.2.3-70-g09d2