Fix hardcoded home path

Add underline effect, Correct use of Path
This commit is contained in:
Lucas Noki 2019-12-27 03:18:39 +01:00 committed by Marcel Schwarz
parent f9ce15619e
commit 9fe48808e7

View File

@ -1,6 +1,7 @@
from AbstractModule import AbstractModule
from subprocess import call
from PyInquirer import prompt
from pathlib import Path
import os
import json
@ -45,7 +46,9 @@ class VimModule(AbstractModule):
selected_plugins = self.do_plugin_selection()
default_settings = self.add_settings()
# print out selected plugins
print("\033[4mYour selection:\033[0m")
[print(x) for x in selected_plugins]
print("\n\033[4mDefault settings:\033[0m")
[print(i) for i in default_settings]
# Create vimrc file
@ -79,8 +82,10 @@ class VimModule(AbstractModule):
vimrc_file.write(line)
# Create necessary folder structure for Plugin Manager
if not os.path.isdir("/home/john/Gitlab/linux-tools/testdirectory/autoload/"):
if os.path.isdir("/home/john/Gitlab/linux-tools/testdirectory/"):
autoload = str(Path.home().joinpath("Gitlab", "linux-tools", "testdirectory", "autoload"))
testdirectory = str(Path.home().joinpath("Gitlab", "linux-tools", "testdirectory"))
if not os.path.isdir(autoload):
if os.path.isdir(testdirectory):
install_vimplug = "cd ~/Gitlab/linux-tools/testdirectory/ " \
"&& mkdir autoload " \
"&& cd autoload " \