diff --git a/do_what.py b/do_what.py index b35c0ef..95e7bbb 100644 --- a/do_what.py +++ b/do_what.py @@ -292,6 +292,8 @@ elif ( (not active and len(sys.argv) == 2) or (active and len(sys.argv) == 3) ): if ( is_binary_file(path) ): filemime = mime.from_file(path) print("echo Binary file: "+filemime) + if ( filemime == "inode/symlink" ): + print("echo Symlink location: "+os.path.realpath(path)) else: trows, tcolumns = os.popen('stty size', 'r').read().split() # if file is taller than the terminal, pipe it to a pretty-print display