Emre AKYÜZ 2d79fbeb41
aliasrc | improve se()
1. Remove external commands like find.
2. Remove extensions and path (if present) from the names in fzf.
3. Only open Nvim if there is a selection.

Do all of these without using find, sed, grep.

- First line creates an array with the files in the scripts directory.

- Second line removes path (:t) and the extensions (:r) from the scripts.

- [[ "${c}" ]] checks if this variable is non-empty.

- ${${(M)s:#*/${c}*}[1]}
(M) enables "match" mode.
:# anchors the pattern to the start of each array element.
*/${c}* matches any path containing the selected basename.
[1] selects the first matching item.
2024-09-02 16:17:45 +03:00
..
2024-09-02 16:17:45 +03:00
2021-08-25 08:02:39 -04:00
2023-07-15 18:57:12 +02:00
2020-11-16 18:06:41 -05:00