mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-22 08:11:28 +00:00
Implement raw search, not support spaces. Ideal for federated links
This commit is contained in:
parent
c4313c595d
commit
171448a20b
|
@ -614,9 +614,18 @@ timeline_api()
|
||||||
"direct") default_curl_opt "$instance_point/timelines/direct?$timelines_params" ;;
|
"direct") default_curl_opt "$instance_point/timelines/direct?$timelines_params" ;;
|
||||||
"public") default_curl_opt "$instance_point/timelines/public?$timelines_params" ;;
|
"public") default_curl_opt "$instance_point/timelines/public?$timelines_params" ;;
|
||||||
"local") default_curl_opt "$instance_point/timelines/public?local=true&$timelines_params" ;;
|
"local") default_curl_opt "$instance_point/timelines/public?local=true&$timelines_params" ;;
|
||||||
|
"search") echo "$results" ;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
search_api_statuses()
|
||||||
|
{
|
||||||
|
echo "Input query:"
|
||||||
|
read query
|
||||||
|
results=$(default_curl_opt "$instance_point/search?q=$query&type=statuses" | jj 'statuses')
|
||||||
|
timeline='search' timeline_menu
|
||||||
|
}
|
||||||
|
|
||||||
timeline_menu()
|
timeline_menu()
|
||||||
{
|
{
|
||||||
json=$(timeline_api)
|
json=$(timeline_api)
|
||||||
|
@ -895,13 +904,14 @@ my_account='Account'
|
||||||
followrequests='Follow requests'
|
followrequests='Follow requests'
|
||||||
backup_restore='Backup/Restore'
|
backup_restore='Backup/Restore'
|
||||||
manage_followings='Manage followings'
|
manage_followings='Manage followings'
|
||||||
|
search_menu='Search'
|
||||||
authmake='Auth'
|
authmake='Auth'
|
||||||
switchinstance='Switch instance'
|
switchinstance='Switch instance'
|
||||||
Exit='Exit'
|
Exit='Exit'
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
if [ -n "$auth" ]; then
|
if [ -n "$auth" ]; then
|
||||||
main_menu=$(echo "$menu_write_status\n$menu_timeline\n$notif\n$my_account\n$switchinstance\n$Exit" | fzy)
|
main_menu=$(echo "$menu_write_status\n$menu_timeline\n$notif\n$my_account\n$search_menu\n$switchinstance\n$Exit" | fzy)
|
||||||
else
|
else
|
||||||
main_menu=$(echo "$authmake\n$menu_timeline\n$switchinstance\n$Exit" | fzy)
|
main_menu=$(echo "$authmake\n$menu_timeline\n$switchinstance\n$Exit" | fzy)
|
||||||
fi
|
fi
|
||||||
|
@ -930,7 +940,7 @@ while true; do
|
||||||
"$backup_restore") backup_restore_menu ;;
|
"$backup_restore") backup_restore_menu ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
"$search_menu") search_api_statuses ;;
|
||||||
"$switchinstance")
|
"$switchinstance")
|
||||||
empty=0
|
empty=0
|
||||||
case $(echo 'Recently used\nChoice from list\nManual input' | fzy) in
|
case $(echo 'Recently used\nChoice from list\nManual input' | fzy) in
|
||||||
|
|
Loading…
Reference in a new issue