11 Commits

Author SHA1 Message Date
a96aa50fbe Add --show option to build-dir command
The new option shows the current build directory, if present.
2022-07-11 13:47:05 +01:00
81657d6f50 Update vim version check for enabling vimdebug 2020-02-06 13:36:05 +00:00
a095e9383c Escape * in vimdebug before passing to debug
With `setopt nonomatch` unescaped `*` can be used in command arguments
however when passing command arguments to `vimdebug` the `*` _should_
be escaped so that the debugger e.g. `gdb` will correctly invoke the
program where `setopt nonomatch` does not apply.
2019-04-18 10:41:12 +01:00
256cd06e5a build-dir now exports build_dir envvar
In addition to setting the `~build` hashed directory, also export the
`build_dir` environment variable to enable commands like this:

```
cmake . -B$build_dir
```
2018-11-07 10:58:04 +00:00
9037d2dd41 Default to using VIM's termdebug plugin for debug
VIM 8.1 added the optional plugin termdebug which integrates gdb
with separate buffers for source, output, and gdb console. This adds the
`vimdebug` command which enables the termdebug plugin and executes the
`:TermdebugCommand` with the given arguments.
2018-11-07 10:53:14 +00:00
2589b63023 Fix build-dir not stooping on error, remove build-dir.py 2018-09-03 11:32:58 +01:00
9e9c43a0cf Fix error in build-dir when --build is not set 2018-08-28 14:44:19 +01:00
3194afc80d Replace build-dir.py with zcurses build-dir
Update the build-dir shell function to usage zcurses instead of the
Python pick package to interactively select build directories, this
results in a more responsive user experience. Add argument parsing to
handle various use cases. Add prompt when the build command for the
selected build directory could not be detected, allowing the user to
specify the desired build command.

```
usage: build-dir [-h] [--build] [<directory>]

Find and select the current build directory interactively.

positional arguments:
  <directory> the build directory to select

optional arguments:
  -h, --help  show this help message and exit
  --build     invoke a build after selection
```
2018-08-24 11:04:18 +01:00
087a315289 Fix build-run and build-debug functions 2018-08-22 17:17:06 +01:00
8cad5acd83 Correct build command todo list 2018-08-20 10:41:34 +01:00
b12dcfe243 Add build utility commands
* `build` is an alias which on first use invokes `build-dir --build` to
  select a build directory, reconfigure the `build` alias, and invoke
  the `build` alias on the selected build directory.
* `debug` is an alias to the installed system native debugger.
* `build-dir` is a function to select a build directory by reconfiguring
  the `build` alias, it detects `build.ninja` or `Makefile` in the build
  directory and selects the appropriate `ninja` or `make` command.
  Depends on the `build-dir.py` Python script which uses the `pick`
  package to interactively select the build directory.
* `build-run` is a function which builds the specified target then
  attempts to run it, making the assumption it resides in the `bin`
  subdirectory of the build directory.
* `build-debug` is a function which build the specified tared then
  attempts to debug it using the system native debugger, making the
  assumption it resides in the `bin` subdirectory of the build
  directory.
2018-05-01 23:25:31 +01:00