change how mounts are listed
This commit is contained in:
@@ -8,14 +8,18 @@ _helpexit() {
|
||||
-u will unmount all FUSE.rclone paths if no path given!
|
||||
|
||||
" "$( basename $0 )"
|
||||
echo Current mounts:
|
||||
cat /proc/mounts | grep fuse.rclone | awk '{ print $1 "\t" $2 }'
|
||||
_current_mounts
|
||||
exit 1
|
||||
}
|
||||
|
||||
_menu() {
|
||||
_current_mounts() {
|
||||
echo Current mounts:
|
||||
cat /proc/mounts | grep fuse.rclone | awk '{ print $1 "\t" $2 }'
|
||||
cat /proc/mounts | grep fuse.rclone | awk '{ print $1 " " $2 }' | sed "s,$HOME,~," | xargs printf "%15s %s\n"
|
||||
}
|
||||
|
||||
|
||||
_menu() {
|
||||
_current_mounts
|
||||
_askpass
|
||||
choice=$( rclone --ask-password=false listremotes | \
|
||||
sort | \
|
||||
|
||||
@@ -11,16 +11,25 @@ _helpexit() {
|
||||
-nofollow disable symlinks following
|
||||
|
||||
" "$( basename $0 )"
|
||||
echo Current mounts:
|
||||
cat /proc/mounts | grep fuse.sshfs | awk '{ print $1 "\t" $2 }'
|
||||
_current_mounts
|
||||
exit 1
|
||||
}
|
||||
|
||||
_menu() {
|
||||
_current_mounts() {
|
||||
echo Current mounts:
|
||||
cat /proc/mounts | grep fuse.sshfs | awk '{ print $1 "\t" $2 }'
|
||||
choice=$( grep -Pi "^host ([^*]+)$" $HOME/.ssh/config | \
|
||||
sed 's/host //i' | tr ' ' '\n' | sort | \
|
||||
cat /proc/mounts | grep fuse.sshfs | awk '{ print $1 " " $2 }' | sed "s,$HOME,~," | xargs printf "%15s %s\n"
|
||||
}
|
||||
|
||||
_hosts() {
|
||||
{
|
||||
grep -Pi -e "^host ([^*]+)$" $HOME/.ssh/config | grep -e "#.sshfs";
|
||||
grep -Pi -e "^host ([^*]+)$" $HOME/.ssh/config | grep -v -e "#.sshfs";
|
||||
} | awk '{ print $2 }' | tr ' ' '\n' | grep -vie "^host$" -e "*" -e "^$";
|
||||
}
|
||||
|
||||
_menu() {
|
||||
_current_mounts
|
||||
choice=$( _hosts | \
|
||||
smenu -t 1 -a c:0/2 i:3 -n 25 -m "Select server" \
|
||||
-N -D n:1 i:1 )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user