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