Skip to content

Instantly share code, notes, and snippets.

static PyObject *
long_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
static const char * const _keywords[] = {"", "base", NULL};
static _PyArg_Parser _parser = {NULL, _keywords, "int", 0};
PyObject *argsbuf[2];
PyObject * const *fastargs;
Py_ssize_t nargs = PyTuple_GET_SIZE(args);
Py_ssize_t noptargs = nargs + (kwargs ? PyDict_GET_SIZE(kwargs) : 0) - 0;
[
{
"directory": "/Users/peter/build_fish",
"command": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -DBINDIR=L\\\"/usr/local/bin\\\" -DCMAKE_BINARY_DIR=\\\"/Users/peter/build_fish\\\" -DCMAKE_SOURCE_DIR=\\\"/Users/peter/github/fish-shell\\\" -DDATADIR=L\\\"/usr/local/share\\\" -DDOCDIR=L\\\"/usr/local/share/doc/fish\\\" -DLOCALEDIR=\\\"/usr/local/share/locale\\\" -DPREFIX=L\\\"/usr/local\\\" -DSYSCONFDIR=L\\\"/usr/local/etc\\\" -D_REENTRANT -D_UNICODE=1 -I. -I/usr/local/include -fdiagnostics-color=always -g -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -fno-exceptions -o CMakeFiles/fish_macapp.dir/osx/osx_fish_launcher.m.o -c /Users/peter/github/fish-shell/osx/osx_fish_launcher.m",
"file": "/Users/peter/github/fish-shell/osx/osx_fish_launcher.m"
},
{
"directory": "/Users/peter/build_fish",
"command": "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/b
{
"configurations": [
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1"
],
"defines": [],
complete(1) fish complete(1)
NNAAMMEE
complete
ccoommpplleettee -- eeddiitt ccoommmmaanndd ssppeecciiffiicc ttaabb--ccoommpplleettiioonnss
SSyynnooppssiiss
ccoommpplleettee ( -c | --command | -p | --path ) COMMAND
#include <memory>
#include <string>
struct CharList {
char c;
std::unique_ptr<CharList> next;
explicit CharList(char c) : c(c) {}
};
CharList make_list(const std::string &s) {
#!/usr/bin/env sh
# Originally from the git sources (GIT-VERSION-GEN)
# Presumably (C) Junio C Hamano <junkio@cox.net>
# Reused under GPL v2.0
# Modified for fish by David Adam <zanchey@ucc.gu.uwa.edu.au>
set -e
# Find the fish git directory as two levels up from script directory.
GIT_DIR="$( cd "$( dirname $( dirname "$0" ) )" && pwd )"
#include <string>
#include <sys/types.h>
#include <pwd.h>
#include <uuid/uuid.h>
#include <vector>
#include <thread>
static size_t burn() {
size_t ret = 0;
setpwent();
@ridiculousfish
ridiculousfish / width.c
Created June 23, 2018 23:30
wcwidth of variation selector
#include <wchar.h>
#include <stdio.h>
#include <locale.h>
int main(void) {
char *loc = setlocale(LC_ALL, "");
printf("%s %d\n", loc, wcwidth(0xFE0F));
return 0;
}
#include <stdio.h>
#include <functional>
void func(std::function<void(void)> func) {
printf("func1\n");
}
template<typename ANYTHING>
static void foo() {
func([](){});
diff --git a/autoload.cpp b/autoload.cpp
index c883f8b..12ae9db 100644
--- a/autoload.cpp
+++ b/autoload.cpp
@@ -3,15 +3,23 @@
The classes responsible for autoloading functions and completions.
*/
-#include "config.h"
#include "autoload.h"