Skip to content

Instantly share code, notes, and snippets.

@metowolf
Last active July 18, 2016 11:27
Show Gist options
  • Save metowolf/aa441d753bf4761cfa5fb0fd4d05fc6e to your computer and use it in GitHub Desktop.
Save metowolf/aa441d753bf4761cfa5fb0fd4d05fc6e to your computer and use it in GitHub Desktop.
Gedit with G++
#!/bin/sh
fullname=$GEDIT_CURRENT_DOCUMENT_NAME
dir=$GEDIT_CURRENT_DOCUMENT_DIR
name=`echo $fullname | cut -d. -f1`
g++ -g $fullname -o $name -std=gnu++11 -static && echo "success" && gnome-terminal --hide-menubar --working-directory=$dir -x bash -c "time $dir/$name;read"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment