diff --git a/README.md b/README.md index 5cec571..6ad95e8 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,6 @@ This project is currently a work-in-progress. Only the fish shell is supported a ## TODO - Documentation/License - Installation & Generalization - - Zsh Support - Command Memory/Env Support - Double wh does an la, not ls - Git Repo detection for ls diff --git a/do_what.py b/do_what.py index cd31a9f..7c51bbd 100644 --- a/do_what.py +++ b/do_what.py @@ -14,7 +14,7 @@ list_directory="ls --color=auto" def set_runtime_var(name, value, options=""): if ( shell == "fish" ): print("set "+name+" "+options+" \""+value+"\"") - elif ( shell == "bash" || shell == "zsh" ): + elif ( shell == "bash" or shell == "zsh" ): print("export "+name+"="+"\""+value+"\"") def is_binary_file(filepathname): @@ -38,10 +38,10 @@ def file_len(fname): # bootstrap the config ENV_HOME=os.environ['HOME'] -subprocess.call(['mkdir', '-p', ENV_HOME+'/.config']) -if ( os.path.isfile(ENV_HOME+'/.config/what.config') ): +subprocess.call(['mkdir', '-p', ENV_HOME+'/.config/do_what']) +if ( os.path.isfile(ENV_HOME+'/.config/do_what/what.config') ): config = configparser.ConfigParser() - config.read(ENV_HOME+'/.config/what.config') + config.read(ENV_HOME+'/.config/do_what/what.config') if ( 'DEFAULT' in config ): if ( 'print_file' in config['DEFAULT'] ): print_file = config['DEFAULT']['print_file'] @@ -60,7 +60,7 @@ else: 'print_file': print_file } print("echo Default config loaded.") - with open(ENV_HOME+'/.config/what.config', 'w') as configfile: + with open(ENV_HOME+'/.config/do_what/what.config', 'w') as configfile: config.write(configfile) configfile.close()