systemSetup

system setup, configuration and dotfiles
git clone https://noulin.net/git/systemSetup.git
Log | Files | Refs | README | LICENSE

commit 740d87ea44d449ae4a790260fef3a8dc2b3fec6f
parent ef684678e77c51f1aff5b218d550a0019d80c50e
Author: Remy Noulin <loader2x@gmail.com>
Date:   Sat, 23 Feb 2019 09:44:09 -0500

allow vop.c to open files in vim without line numbers

dotfiles/vop.c | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

Diffstat:
Mdotfiles/vop.c | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/dotfiles/vop.c b/dotfiles/vop.c @@ -3,11 +3,14 @@ #include <unistd.h> void open(char *s) { - var sp = splitG(s, ':'); - if (lenG(sp) > 1) { - systemf("vim %s +%s", sp[0], sp[1]); + if (hasG(s, ':')) { + var sp = splitG(s, ':'); + if (lenG(sp) > 1) { + systemf("vim %s +%s", sp[0], sp[1]); + } + freeG(sp); } - freeG(sp); + else systemf("vim %s", s); } int main(int ARGC, char** ARGV) {