mirror of
http://gitea.phreedom.club/localhost_frssoft/pleroma-cli
synced 2024-11-21 19:41:30 +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" ;;
|
||||
"public") default_curl_opt "$instance_point/timelines/public?$timelines_params" ;;
|
||||
"local") default_curl_opt "$instance_point/timelines/public?local=true&$timelines_params" ;;
|
||||
"search") echo "$results" ;;
|
||||
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()
|
||||
{
|
||||
json=$(timeline_api)
|
||||
|
@ -895,13 +904,14 @@ my_account='Account'
|
|||
followrequests='Follow requests'
|
||||
backup_restore='Backup/Restore'
|
||||
manage_followings='Manage followings'
|
||||
search_menu='Search'
|
||||
authmake='Auth'
|
||||
switchinstance='Switch instance'
|
||||
Exit='Exit'
|
||||
|
||||
while true; do
|
||||
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
|
||||
main_menu=$(echo "$authmake\n$menu_timeline\n$switchinstance\n$Exit" | fzy)
|
||||
fi
|
||||
|
@ -930,7 +940,7 @@ while true; do
|
|||
"$backup_restore") backup_restore_menu ;;
|
||||
esac
|
||||
;;
|
||||
|
||||
"$search_menu") search_api_statuses ;;
|
||||
"$switchinstance")
|
||||
empty=0
|
||||
case $(echo 'Recently used\nChoice from list\nManual input' | fzy) in
|
||||
|
|
Loading…
Reference in a new issue