-
Notifications
You must be signed in to change notification settings - Fork 192
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
SCM Breeze feature - Shortcut to files from ls, and wrap common shell commands #44
Comments
Very interesting idea! I'll see if anything breaks for me. |
Same thing is happening with Also when my shell opens I'm now told
|
Hey, thanks so much for your help! I've pushed some fixes for shell builtins, and ensured colors are stripped from |
Working great. This is awesome! |
Good to hear! Thanks! |
I like this feature and am using it. BTW, do you think it will be a good idea to have the numeric shortcut for |
Hey, I think that's a great idea, and I've just pushed support for Numbered shortcuts are now shown for
All of these aliases work with the numbers from git branch, so you type things like: Thanks for this idea, it really is useful! |
Note: You should be able to run the |
I have my customized cd() {
MAX=10
LEN=${#DIRSTACK[@]}
if [ $# -eq 0 ] || [ "$1" = "-" ]; then
builtin cd "$@"
pushd -n $OLDPWD > /dev/null
else
local len=`expr match "$1" '^-[0-9]*'`
if [ $len -ge 2 ]; then
builtin pushd +${1:1} > /dev/null
else
pushd "$@" > /dev/null || return 1
fi
fi
if [ $LEN -gt 1 ]; then
for i in `seq 1 $LEN`; do
eval p=~$i
if [ "$p" = "$PWD" ]; then
popd -n +$i > /dev/null
break
fi
done
fi
if [ $LEN -ge $MAX ]; then
popd -n -0 > /dev/null
fi
# Default action: list files
ls
} Can I specify which bash commands to be scm_breezed? I definitely like my |
Ah, I see, you are already using numbers for your custom cd. |
Awesome! Thank you so much! |
I've just finished some work that integrates the numeric shortcuts into the rest of your shell commands.
So, as well as shortcuts for files in
git status
, you can now also get shortcuts to files from the output ofls
. I was usingll
as an alias forls -l
, but now I've turnedll
into an SCM Breeze function that gives the following output:After typing
ll
, you can use any of the following commands with the numbered shortcuts:vim
,emacs
,gedit
,cat
,rm
,cp
,mv
,ln
,ls
,cd
For example, let's say you wanted display the contents of
scmbrc.example
- now you can just typecat 11
.I've tested it out as much as I can, but I'm sure we will run into some strange issues at some point.
If you would like to help test it, please update scm_breeze from the
master
branch and let me know how it works for you.Also let me know if you have any suggestions for commands that should be added to the list above.
Thanks!
The text was updated successfully, but these errors were encountered: