systemSetup

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

commit cef8f52b5dfaba4ca181021d2fc19a6d43cffa71
parent 6d744cdb89545aaf82b699b7a7bf152cb951eb8a
Author: Remy Noulin <loader2x@gmail.com>
Date:   Wed,  6 Feb 2019 04:35:00 -0500

add vop command to open file at specified line: vop FILENAME:LINE:TEXT or empty

the argument for vop has the format returned by grep

debian/updateHomeNoGui.sh | 1 +
dotfiles/.bash_aliases    | 1 +
2 files changed, 2 insertions(+)
debian/updateHomeNoGui.sh |  1 +
dotfiles/.bash_aliases    |  1 +
dotfiles/vop.c            | 15 +++++++++++++++
3 files changed, 17 insertions(+)

Diffstat:
Mdebian/updateHomeNoGui.sh | 1+
Mdotfiles/.bash_aliases | 1+
Adotfiles/vop.c | 15+++++++++++++++
3 files changed, 17 insertions(+), 0 deletions(-)

diff --git a/debian/updateHomeNoGui.sh b/debian/updateHomeNoGui.sh @@ -17,6 +17,7 @@ cp ../dotfiles/xapianOmegaSearch.sh ~/bin/ cp ../dotfiles/ref.sh ~/bin/ cp ../dotfiles/gle.sh ~/bin/ cp ../dotfiles/gdf.sh ~/bin/ +cp ../dotfiles/vop.c ~/bin/ mkdir ~/.gnupg cp ../dotfiles/gpg-agent.conf ~/.gnupg/ mkdir ~/.ssh diff --git a/dotfiles/.bash_aliases b/dotfiles/.bash_aliases @@ -27,6 +27,7 @@ alias noc="sed 's/\x1b\[[0-9;]*[a-zA-Z]//g'" alias td='tree -d' alias d='gdb -tui' alias da='gdb -tui --args' +alias vop='vop.c' # Display colors in less : alias less="less -R" diff --git a/dotfiles/vop.c b/dotfiles/vop.c @@ -0,0 +1,15 @@ +#! /usr/bin/env sheepy +#include "libsheepyObject.h" + +int main(int ARGC, char** ARGV) { + + if (ARGC > 1) { + var sp = splitG(ARGV[1], ':'); + if (lenG(sp) > 1) { + systemf("vim %s +%s", sp[0], sp[1]); + } + freeG(sp); + } + +} +// vim: set expandtab ts=2 sw=2: