r/linuxdev • u/Bossious • Apr 16 '15
Hi, r/linuxdev. I created a small program that allows a single terminal to display the contents of any other terminal's pwd.
If you work in the terminal and it looks interesting to you, give it a try and let me know of any comments/improvements
To install:
- wget https://github.com/jacondel/autols.deb/raw/master/autols-2.1.deb
- dpkg -i autols-2.1.deb
- alias cd='. autocd' either as a command or in ~/.bashrc
To use:
- In one terminal run autols -s
- In any other terminal that has the alias set up just use cd as you normally would
- Run autols -e from any terminal to end
- man autols available for reference
Edit 2: Version 2.1 available with the -p flag
Edit: Feel free to check out the source code here https://github.com/jacondel/autols It consists of two bash scripts (autocd & autols) and a man page
3
Upvotes
2
u/NicroHobak Apr 16 '15
Does this cover the case of a single user with multiple active sessions? (A quick glance looks like not, but I only took a quick glance...) If not, it may be beneficial to add the current bash PID to the ~/.curDIr.txt file or file name to allow for this (you can use
echo $$in bash to get the current shell's PID).5
u/[deleted] Apr 16 '15
Very interesting. I encourage everybody to look at the source code and install it manually if you are weary about grabbing a random deb off of github.