add automatic vim sudo; remove example config file
This commit is contained in:
parent
9ef6c03998
commit
3f9c3b61f2
@ -18,5 +18,4 @@ This project is currently a work-in-progress. Only the fish shell is supported a
|
|||||||
- Double wh does an la, not ls
|
- Double wh does an la, not ls
|
||||||
- Git Repo detection for ls
|
- Git Repo detection for ls
|
||||||
- Clipboard functionality
|
- Clipboard functionality
|
||||||
- sudo vim
|
|
||||||
- Binary File MIME Types
|
- Binary File MIME Types
|
||||||
|
@ -141,7 +141,10 @@ elif ( (not active and len(sys.argv) == 2) or (active and len(sys.argv) == 3) ):
|
|||||||
if ( is_binary_file(path) ):
|
if ( is_binary_file(path) ):
|
||||||
print("echo Binary file.")
|
print("echo Binary file.")
|
||||||
else:
|
else:
|
||||||
print(edit_file+" "+path)
|
if ( os.access(path, os.W_OK) ):
|
||||||
|
print(edit_file+" "+path)
|
||||||
|
else:
|
||||||
|
print("sudo "+edit_file+" "+path)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# check if file is a path program, then list using which/man on active
|
# check if file is a path program, then list using which/man on active
|
||||||
|
@ -1,5 +0,0 @@
|
|||||||
[DEFAULT]
|
|
||||||
print_file = cat
|
|
||||||
pretty_print_file = less -R
|
|
||||||
edit_file = vim
|
|
||||||
list_directory = ls --color=auto
|
|
Loading…
Reference in New Issue
Block a user