31 lines
784 B
Python
31 lines
784 B
Python
|
|
import ocarina
|
|
from ct.opts import args
|
|
from ct.path import *
|
|
from ct.call import *
|
|
|
|
# Disable immediately playing a song when it is loaded
|
|
ocarina.vars["$playonload"] = False
|
|
|
|
# Load a song if we were passed one on load
|
|
space = ' '
|
|
song = space.join(args)
|
|
if exists( song ):
|
|
load(song)
|
|
|
|
|
|
# Enable readline tab completion
|
|
import readline
|
|
import rlcompleter
|
|
readline.parse_and_bind("tab:complete")
|
|
|
|
# Configure readline history.
|
|
# This file is written after every command entered, but you can comment out
|
|
# these lines to ignore the file
|
|
history = join(ocarina.vars["$ocarina"],"history")
|
|
if exists( history ):
|
|
readline.read_history_file(history)
|
|
|
|
# Set the max number of lines to store in the history file.
|
|
# A negative number means unlimited length
|
|
readline.set_history_length(50) |