Comments (3)
OK, it shouldn't be much trouble to implement,
- if [[ "${ans,,}" == $(gettext 'y')* ]]; then
- pacignore add -c "$PACMAN_CONF" "$pkg"
- fi
+ case "${ans,,}" in
+ # comment explaining why we're doing this surprising thing
+ $(gettext 'y')*|y*)
+ pacignore add -c "$PACMAN_CONF" "$pkg"
+ ;;
+ esac
(And similar anywhere else we have a y/n prompt.)
I'm not sure when I'd be able to actually do this work/release, etc, but I'll leave this here in case anyone else can jump on it.
from downgrade.
Oh, interesting use-case!
Looking over the code, I find this:
eval_gettext "add \$pkg to IgnorePkg? [y/N] "
read -r ans
if [[ "${ans,,}" == $(gettext 'y')* ]]; then
What that means is that we compare ans
with the localized string for y
. With the ru
locale, which I assume you're using, that is:
#: bin/downgrade:129
msgid "y"
msgstr "д"
So gettext 'y'
returns д
. If you enter that (ans="д"
), then the condition's true and it works. If you type y
instead (ans="y"
), the condition's false and it doesn't work.
It sounds like your use-case is to be in one locale (ru
), but answer prompts in another (en
). This isn't directly related to keyboard layout, but I can see how one leads to the other. Just curious, is there a reason you don't switch locales when you switch keyboard layouts?
The only way I can think of to make this work is if we change our code to also accept en
answers to prompts in addition to the localized values.
Does this all sound accurate? Am I missing anything?
from downgrade.
Yes, thank you, you understood everything correctly. I’m just too lazy to switch the layout because when working in the shell, the Russian layout is almost never needed.
from downgrade.
Related Issues (20)
- fzf as optional dependency HOT 4
- Use `getopts` to handle CLI arguments in lower-level scripts HOT 1
- IgnorePkg incorrectly added if IgnorePkg string is not already in config file HOT 4
- Packages with a slash in the name cannot be downgraded HOT 4
- Does not handle multile architectures in pacman.conf HOT 2
- v12 roadmap
- Downgrade somehow bricked my entire system HOT 3
- `downgrade-11.2.0-1` does not appear to build with `paru HOT 5
- Downgrade with dependencies HOT 6
- Downgrade system upgrade from pacman log HOT 3
- Option to not ask to add IgnorePkg HOT 1
- Help with cram test function HOT 6
- Should the default config show all options or defaults? HOT 1
- downgrade-11.3.0-1 package doesn't include executables HOT 3
- Force Option HOT 7
- Fzf menu keymaps HOT 3
- Add documentation for AUR package downgrading HOT 4
- After some full system update, i got "error while loading shared libraries: libalpm.so.13" HOT 5
- `-- --nodeps` ignored HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from downgrade.