Emre AKYÜZ e2d787992e
aliasrc | improve se() (#1433)
* 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.

* capture sub-directories too
2025-02-28 19:11:57 +00:00
..
2023-08-25 07:53:59 +00:00
2020-01-28 15:10:05 -05:00
2019-11-23 16:16:30 -05:00
2025-02-28 19:10:40 +00:00
2024-07-15 17:37:38 +00:00
2024-05-17 09:13:07 -04:00
2020-11-29 09:09:30 -05:00
2023-02-09 14:37:31 +00:00
2025-02-28 19:11:57 +00:00
2020-01-20 14:23:31 -05:00
2024-03-28 13:13:34 +00:00
2023-10-28 08:41:26 -04:00
2020-04-09 16:56:47 -04:00