chj-home
shell-scripts
chj-home | shell-scripts | |
---|---|---|
1 | 1 | |
2 | 0 | |
- | - | |
5.8 | 0.0 | |
2 months ago | about 3 years ago | |
Shell | Python | |
- | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
chj-home
-
How to navigate directories faster with Bash (2015)
I do the following [1]:
- I define "cdn" to be what others call "mkcd", as then if I have a command line "cd foo" and it tells me that foo doesn't exist, I can just add the 'n' to the previous entry. I also overload "cdn" so that when not given any argument, it goes into the newest subdirectory in the current directory.
- "u", "uu", "uuu", "uuuu", "uuuuu" for going "up" that many levels, and unlike the aliases in OP, I define them as functions and if those are given an argument, they descends into the path from there: "u foo" is equivalent to "cd ../foo", "uu foo" to "cd ../../foo".
- I also have a function called "mvcd foo bar" that moves foo to bar and then goes into bar. "mvcdnewdir foo bar" that does the same but will create bar. (I'm pondering unifying them to a version that always calls mkdir -p)
- an alias "c" for cd [2]. The single letter messes with the history search though (ctl-r c space or ctl-r cd space ?), so it's not necessarily a good idea.
- some functions for special locations, "cs" for ~/scratch, "cb" for ~/bookmarks, etc.
[1] see .bashrc at https://github.com/pflanze/chj-home
shell-scripts
-
How to navigate directories faster with Bash (2015)
Here's my answer to that, an 'nd' (newdir?) alias that calls this python script:
https://github.com/danwills/shell-scripts/blob/bb989985d270c...
This makes all directories with names provided by args, including spaces and multiple levels (slashes) at once. It then enters the resulting directory as well (when aliased including 'cd' as advised in the comment).
What are some alternatives?
bashmarks - Directory bookmarks for the shell
fasd - Command-line productivity booster, offers quick access to files and directories, inspired by autojump, z and v.
ranger - A VIM-inspired filemanager for the console
zoxide - A smarter cd command. Supports all major shells.
hstr - bash and zsh shell history suggest box - easily view, navigate, search and manage your command history.
goat - POSIX-compliant shell movement boosting hack for real ninjas (aka `cd x` and `cd ...`)
dotfiles - George Spake Dotfiles