kssh search on all my account, not in the directory path context
Created by: clarsonneur
kssh current uses :
find /home/myAccount/ -name srv_tmpl.yml
This is too heavy for large home dir.
On the other side, the idea was more on where you are in the current directory, try to find out if we find that srv_tmpl.yml and not all.
Ex:
$ cd /home/myaccount/src/myproject/subdir1/subdir2
$ pwd
/home/myaccount/src/myproject/subdir1/subdir2
$ kssh --details
in this example, kssh will search for srv_tmpl.yml in the following order:
- /home/myaccount/src/myproject/subdir1/subdir2/srv_tmpl.yml ?
- /home/myaccount/src/myproject/subdir1/srv_tmpl.yml ?
- /home/myaccount/src/myproject/srv_tmpl.yml ?
- /home/myaccount/src/srv_tmpl.yml ?
- /home/myaccount/srv_tmpl.yml ?
- /home/srv_tmpl.yml ?
- /srv_tmpl.yml ?
first found, first read.
We can imagine, if we are in git repo:
$ cd /home/myaccount/src/myproject/subdir1/subdir2
$ pwd
/home/myaccount/src/myproject/subdir1/subdir2
$ git rev-parse --show-toplevel
/home/myaccount/src/myproject
$ kssh --details
in this example, kssh will search for srv_tmpl.yml in the following order:
- /home/myaccount/src/myproject/subdir1/subdir2/srv_tmpl.yml ?
- /home/myaccount/src/myproject/subdir1/srv_tmpl.yml ?
- /home/myaccount/src/myproject/srv_tmpl.yml ?
first found, first read.