move some functions into general aliases file, improve promptchar portability