start new:
tmux
start new with session name:
tmux new -s myname
function __should_na | |
set -l cmd (history --max=1|awk '{print $1;}') | |
set -l cds cd z j popd g | |
if contains $cmd $cds | |
~/scripts/fish/na | |
end | |
end | |
function fallback --description 'allow a fallback value for variable' | |
if test (count $argv) = 1 |
function __git_fzf_is_in_git_repo | |
command -s -q git | |
and git rev-parse HEAD >/dev/null 2>&1 | |
end | |
function __git_fzf_git_status | |
__git_fzf_is_in_git_repo; or return | |
git -c color.status=always status --short | \ | |
fzf -m --ansi --preview 'git diff --color=always HEAD -- {-1} | head -500' | \ | |
cut -c4- | \ |
#!/bin/bash | |
# https://gist.github.com/robwierzbowski/5430952/ | |
# Create and push to a new github repo from the command line. | |
# Grabs sensible defaults from the containing folder and `.gitconfig`. | |
# Refinements welcome. | |
# Gather constant vars | |
CURRENTDIR=${PWD##*/} | |
GITHUBUSER=$(git config github.user) |