Tom's awesome .profile
Shell Python
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
source
crontab
install
profile
readme.md

readme.md

prophyl-teh-awesum

I am a minimal shell .profile framework.

prophyl-teh-awesome stores aliases and small helpers that work across shells. It doesn't provide themes; if you want those, try bash-it or oh-my-zsh.

Install

Install dependencies.

  • uuidgen
  • python

Run this.

git clone git://github.com/tlevine/.prophyl-teh-awesum ~/.prophyl-teh-awesum
~/.prophyl-teh-awesum/install
. ~/.profile

Customizing

Installing prophyl-teh-awesum links your ~/.profile to ~/.prophyl-teh-awesum/profile. This profile script sources all of the non-hidden files in ~/.prophyl-teh-awesum/source in alphabetical order.

Add scripts by putting them in this directory, disable them by adding a dot to the front of the file name, and make libraries by adding zeroes to the front of the file name so they can be accessed from other files.

Tests

Tests are run in another user account with urchin. Directions might be here eventually.

Features

Features are documented here, with each section named after its filename. When features are spread across multiple files, the files are named [feature name]-[component name], and the feature name is used as the section heading here. For disabled features, the leading dot is not used in the name.

git

A bunch of aliases are provided.

history

Every time a new r or sh terminal is opened, it is given a likely-unique history file. Hacks achieve similar results for sqlite and python.

A daily crontab entry adds the history files to a git repository, commits them and pushes them.

The history-{sh,sqlite,r} aliases display commonly-used commands.

http

Start a web server in the current directory by running the command http [port]. It tries using a variety of web servers in case you don't have one of them.

ls

Learn ls flags! This defines an l command that randomly choose English ls flag combinations.

$ l -h
usage: l -[dh] [file] ...
-d  directories (ls -d)
-h  this help

scp

This reduces confusion when you forget to type a colon. It wraps the scp command and warns you when you try running it without a colon. An example:

$ scp README.md tlevine@chainsaw.thomaslevine.com
usage: scp [-12346BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file]
           [-l limit] [-o ssh_option] [-P port] [-S program]
           [[user@]host1:]file1 ... [[user@]host2:]file2
 
warning: The scp command that you ran has no colon, so you probably don't
       want to run it. Use "env scp" if you really meant to do that.

tmux

Tmux commands are long, so this file provides some aliases.

alias tmuxl='tmux list-sessions'
alias tmuxa='tmux attach'

urlencoding

Encode and decode url strings.

  • urlencode [string]: Encode the string as a url.
  • urldecode [url]: Decode the url.

To do

This section documents unimplemented features in the spirit of documentation-driven development.

history

Storage of the history file is designed to make it easy to share history across computers. Files are named ~/.history/<language>-<datetime>-<uuid>. This way, different sessions will not manipulate the same file, so merging histories is easy.

history-ipython

Ipython history is stored as a sqlite3 database.