From 4584704fa3a9dc9e2b0ca7cf794db8c6abb4a339 Mon Sep 17 00:00:00 2001 From: Martim Lobao Date: Mon, 20 Jan 2025 19:29:33 +0000 Subject: [PATCH] feat: Cursor shortcut (#83) - 'c' shortcut to open Cursor ## Summary by Sourcery New Features: - Add a "c" keyboard shortcut to open the Cursor application. --- linkme/.functions | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/linkme/.functions b/linkme/.functions index c9ea7dc..e8b0456 100644 --- a/linkme/.functions +++ b/linkme/.functions @@ -40,6 +40,15 @@ function o() { fi } +# `c` with no arguments opens Cursor in the current directory, otherwise opens at the given location +function c() { + if [[ $# -eq 0 ]]; then + cursor . + else + open "$@" + fi +} + # Create a new directory and enter it. function mkd() { mkdir -p "$@" && cd "${_}" || exit 1