mirror of
https://github.com/m-housh/dotfiles.git
synced 2026-02-14 06:12:34 +00:00
18 lines
318 B
Bash
Executable File
18 lines
318 B
Bash
Executable File
#!/usr/bin/env zsh
|
|
|
|
# Open's neovim.
|
|
#
|
|
# If the argument passed in is a directory or not supplied, then
|
|
# open neovim with telescope find files opened. Otherwise open the
|
|
# file that is supplied.
|
|
#
|
|
|
|
function n() {
|
|
[ -d "$1" ] || [ -z "$1" ] \
|
|
&& nvim -c ":Telescope find_files" \
|
|
&& return 0
|
|
|
|
nvim "$1"
|
|
}
|
|
|