-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new feature to base.plugin.bash #2257
base: master
Are you sure you want to change the base?
Conversation
2 New aliases: d: go to Downloads directory from anywhere rmrf: force delete any file or directory recursively
Update general.aliases.bash, 2 new aliases
New function labeled `rex()` servers a single purpose. Replace the file extensions of multiple file at once. File extensions usually does not quite matter in bash, but there is a few cases when one might needs to and this function simplifies the process from multiple commands into one.
@@ -55,6 +56,7 @@ alias cd..='cd ..' # Common misspelling for going up one directory | |||
alias ...='cd ../..' # Go up two directories | |||
alias ....='cd ../../..' # Go up three directories | |||
alias -- -='cd -' # Go back | |||
alias d='cd /home/$USER/Downloads' # Go to the Downloads directory |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a bit too short and already taken by a function for the fasd plugin. please rename to something that won't clobber or move to your private alias file.
@@ -183,3 +183,16 @@ if ! _command_exists del; then | |||
mkdir -p /tmp/.trash && mv "$@" /tmp/.trash | |||
} | |||
fi | |||
|
|||
# replace multiple file extensions at once | |||
function rex() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is already a package in Ubuntu and other distros called rex and I would rather not have them clash. Could you consider naming it renex or rext?
# replace multiple file extensions at once | ||
function rex() { | ||
about 'mass replace of the extension of multiple files' | ||
param '1: extension to replace' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indentation is mixed spaces and tabs, please align all to just tabs. Thanks!
Description
New function labeled
rex()
servers a single purpose. Replace the file extensions of multiple file at once. File extensions usually does not quite matter in bash, but there is a few cases when one might needs to and this function simplifies the process from multiple commands into one.The Function
How Has This Been Tested?
Created multiple test files with different extensions, than proceeded to use
rex
to only change the specified extension which worked flawlesslyTesting Environment
Screenshots (if appropriate):
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.