Use fzf to search for history commands run in current directory only - fzf

Is it possible to use fzf to search for history commands run in current directory only? If it is not possible using fzf, is there any functionally similar tool that allows this?

Related

Can vscode use a profile from Properties/launchSettings.json?

Is there a way to just point ".vscode/launch.json" to a profile defined in my "Properties/launchSettings.json" so I don't need to duplicate those values?
I need to support several different editors and also run from command line with
dotnet run --launch-profile="myprofile"
This is in the docs: https://github.com/OmniSharp/omnisharp-vscode/blob/7095cdad1549686d6786df18e36c2db0cf76b24c/debugger-launchjson.md
"launchSettingsProfile": "${workspaceFolder}/<Relative-Path-To-Project-Directory/Properties/launchSettings.json"

How can I specify that fzf --preview should only find files within the current directory?

fzf --preview 'cat {}' gives me a two-pane terminal window of (left) a fzf fuzzy search for files and (right) a preview of said files.
When called, it starts out showing me /Users/tomnorway/Downloads, regardless of my current directory. I'd like to write a command that only finds files/folders within my current directory (recursively). Having read through man fzf to the best of my ability, I find no way to specify that. Does anyone have any advice?
From you response in the comments, given that the output of echo $FZF_DEFAULT_COMMAND is:
fd . /Users/tomnorway
You should go into your ~/.bashrc and replace the line:
export FZF_DEFAULT_COMMAND='fd . /Users/tomnorway'
with:
export FZF_DEFAULT_COMMAND='fd --type f'
Bonus
I also have an answer for if you want fzf to search a dedicated shortlist of
directories (e.g. Docs, Downloads, Pics, Vids, Admin, MyDir... etc.) regardless
of where you are in the filesystem
(https://stackoverflow.com/a/67019648/14467607). I like this because it
effectively means I can find any file at any time (but without cluttering the
fzf list with thousands of random files from various installations in my home
directory).

EXRM - Can I set vm.args values from the config.exs file?

Somewhat related to this question - Parametrizing node name in Elixir Exrm - is there a way to dynamically set the content of the rel/vm.args file?
In the title, I suggest the use of config.exs, but I'm interested in any scheme that will allow me to add, remove and edit vm arguments at build time.
A bash script might be an idea, but a solution that would also work on Windows, and is preferably based on Elixir code would be the idea.
You can commit to your project repo a rel/vm.args file that you would like to be used instead of the Exrm generated one. Exrm will automatically use this file instead.

FlywayDB ignore sub-folder in migration

I have a situation where I would like to ignore specific folders inside of where Flyway is looking for the migration files.
Example
/db/Migration
2.0-newBase.sql
/oldScripts
1.1-base.sql
1.2-foo.sql
I want to ignore everything inside of the 'oldScripts' sub folder. Is there a flag that I can set in Flyway configs like ignoreFolder=SOME_FOLDER or scanRecursive=false?
An example for why I would do this is say, I have 1000 scripts in my migration folder. If we onboard a new member, instead of having them run the migration on 1000 files, they could just run the one script (The new base) and proceed from there. The alternative would be to never sync those files in the first place, but then people would need to remember to check source control to prior migrations instead of just looking on their local drive.
This is not currently supported directly. You could put both directories at the same level in the hierarchy (without nesting them) and selectively configure flyway.locations to achieve the same thing.
Since Flyway 6.4.0 wildcards are supported in flyway.locations. Examples:
db/**/test
db/release1.*
db/release1.?
More info at https://flywaydb.org/blog/organising-your-migrations

Choosing multiple Hibernate import.sql based on conditions

How can I specify which import file I want hibernate to run. Is there any configuration option that I can put (I think I have seen something like this somewhere) that I can say custom .sql file and hibernate will run it.
I want to split my creation into multiple files. And also I want to run differnet scripts that will generate date based on my hibernate config that I am using. So if I am using local it should one set of .sql files and if I am testing it into QA it should use another.
I have multiple config files that I can run depending on what I want, so now I need to figure out how to put which script should run in which configuration.
cheers
'hibernate.hbm2ddl.import_files' is the setting you want (org.hibernate.cfg.AvailableSettings#HBM2DDL_IMPORT_FILES).
http://docs.jboss.org/hibernate/orm/4.1/javadocs/org/hibernate/cfg/AvailableSettings.html#HBM2DDL_IMPORT_FILES