|
|
@ -2,7 +2,8 @@ import sys
|
|
|
|
import os
|
|
|
|
import os
|
|
|
|
import subprocess
|
|
|
|
import subprocess
|
|
|
|
|
|
|
|
|
|
|
|
shell="fish"
|
|
|
|
# supported values: fish, bash
|
|
|
|
|
|
|
|
shell="bash"
|
|
|
|
|
|
|
|
|
|
|
|
print_file="cat"
|
|
|
|
print_file="cat"
|
|
|
|
pretty_print_file="less -R"
|
|
|
|
pretty_print_file="less -R"
|
|
|
@ -10,7 +11,10 @@ edit_file="vim"
|
|
|
|
list_directory="ls --color=auto"
|
|
|
|
list_directory="ls --color=auto"
|
|
|
|
|
|
|
|
|
|
|
|
def set_runtime_var(name, value, options=""):
|
|
|
|
def set_runtime_var(name, value, options=""):
|
|
|
|
print("set "+name+" "+options+" \""+value+"\"")
|
|
|
|
if ( shell == "fish" ):
|
|
|
|
|
|
|
|
print("set "+name+" "+options+" \""+value+"\"")
|
|
|
|
|
|
|
|
elif ( shell == "bash" ):
|
|
|
|
|
|
|
|
print("export "+name+"="+"\""+value+"\"")
|
|
|
|
|
|
|
|
|
|
|
|
def is_binary_file(filepathname):
|
|
|
|
def is_binary_file(filepathname):
|
|
|
|
textchars = bytearray([7,8,9,10,12,13,27]) + bytearray(range(0x20, 0x7f)) + bytearray(range(0x80, 0x100))
|
|
|
|
textchars = bytearray([7,8,9,10,12,13,27]) + bytearray(range(0x20, 0x7f)) + bytearray(range(0x80, 0x100))
|
|
|
|