Fix hardcoded home path
Add underline effect, Correct use of Path
This commit is contained in:
parent
f9ce15619e
commit
9fe48808e7
@ -1,6 +1,7 @@
|
|||||||
from AbstractModule import AbstractModule
|
from AbstractModule import AbstractModule
|
||||||
from subprocess import call
|
from subprocess import call
|
||||||
from PyInquirer import prompt
|
from PyInquirer import prompt
|
||||||
|
from pathlib import Path
|
||||||
import os
|
import os
|
||||||
import json
|
import json
|
||||||
|
|
||||||
@ -45,7 +46,9 @@ class VimModule(AbstractModule):
|
|||||||
selected_plugins = self.do_plugin_selection()
|
selected_plugins = self.do_plugin_selection()
|
||||||
default_settings = self.add_settings()
|
default_settings = self.add_settings()
|
||||||
# print out selected plugins
|
# print out selected plugins
|
||||||
|
print("\033[4mYour selection:\033[0m")
|
||||||
[print(x) for x in selected_plugins]
|
[print(x) for x in selected_plugins]
|
||||||
|
print("\n\033[4mDefault settings:\033[0m")
|
||||||
[print(i) for i in default_settings]
|
[print(i) for i in default_settings]
|
||||||
|
|
||||||
# Create vimrc file
|
# Create vimrc file
|
||||||
@ -79,8 +82,10 @@ class VimModule(AbstractModule):
|
|||||||
vimrc_file.write(line)
|
vimrc_file.write(line)
|
||||||
|
|
||||||
# Create necessary folder structure for Plugin Manager
|
# Create necessary folder structure for Plugin Manager
|
||||||
if not os.path.isdir("/home/john/Gitlab/linux-tools/testdirectory/autoload/"):
|
autoload = str(Path.home().joinpath("Gitlab", "linux-tools", "testdirectory", "autoload"))
|
||||||
if os.path.isdir("/home/john/Gitlab/linux-tools/testdirectory/"):
|
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/ " \
|
install_vimplug = "cd ~/Gitlab/linux-tools/testdirectory/ " \
|
||||||
"&& mkdir autoload " \
|
"&& mkdir autoload " \
|
||||||
"&& cd autoload " \
|
"&& cd autoload " \
|
||||||
|
Loading…
Reference in New Issue
Block a user