fandreuz / TUI-ConsoleLauncher

Linux CLI Launcher for Android
Other
1.24k stars 257 forks source link

problem with alias involving non-latin characters #356

Closed nathgit closed 2 years ago

nathgit commented 2 years ago

I added an alias to search "jisho", Japanese language dictionary site for a search term & a 's' is added to the end of the search term. The command used was "alias -add jisho search -u https://jisho.org/search/%s". jisho さすけ (Sasuke) should simply search the site for さすけ, but instead searches for 'さすけs", which screws up the results. Am I doing something wrong or does it simply not understand non-latin characters?

nathgit commented 2 years ago

I tried typing the command manually using the "search -u さすけ & it worked fine so what's wrong with the alias?

ghost commented 2 years ago

I added an alias to search "jisho", Japanese language dictionary site for a search term & a 's' is added to the end of the search term. The command used was "alias -add jisho search -u https://jisho.org/search/%s". jisho さすけ (Sasuke) should simply search the site for さすけ, but instead searches for 'さすけs", which screws up the results. Am I doing something wrong or does it simply not understand non-latin characters?

It's because you put an 's' on the end. There's no need for that. Just use a percentage sign on it's own, that's what I do. alias -add jisho search -u https://jisho.org/search/% I use 'ji' rather than 'jisho', the extra letters are wasted.

nathgit commented 2 years ago

I realized there wasn't supposed to be an 's'. I use an app called "hermit - lite apps browser" which allows you to create "apps" from websites by giving them their own window. it allows you to send text to them through the share menu & it uses '%s' so that's what threw me off. You right too about the 'ji'.