Your Latest Workflow Improvement - Desktop Customization & Workflow

Users browsing this thread: 24 Guest(s)
seninha
Long time nixers
Recently I replaced the cd builtin with a function. The path given to the function can be a directory, or a regular file (in which case it's considered the directory in which it resides). So, if I do `cd path/to/file.txt` is the same as `cd path/to`.
The function also sets the completion for the `make` command to the Makefile in the current directory.
It also combines the popd and pushd functionalities (which my shell doesn't have).

If an argument is given, it is interpreted as follows.
  • If the sole argument is a `+` the current directory is added to the beginning of the directory stack.
  • If the first argument is a `+` followed by a list of paths, those paths are added to the directory stack.
  • If the sole argument is `+N` (where N is a number), the N-th entry on the directory stack is moved to the beginning of the stack and it becomes the current directory.
  • If the sole argument is a `-`, the previous current directory becomes the current directory.
  • If the sole argument is `-N` (where N is a number), the N-th entry on the directory stack is removed from the stack.
  • If the sole argument is composed with dots, a directory up in the hierarchy becames the current directory. `cd ..` goes to the parent directory, `cd ...` goes to the parent's parent's directory, etc. You can even do `cd ..../somedir`.
  • If the sole argument is `..X` (where X is a word), go to the first directory up in the hierarchy containing word. For example, if I am at `/home/phill/tmp/stuff/foo` and I enter the command `cd ..tmp`, I go to `/home/phill/tmp`.
  • If the sole argument is a path, go to that path.


Messages In This Thread
Your Latest Workflow Improvement - by z3bra - 17-08-2015, 07:50 AM
RE: You latest workflow improvement - by venam - 17-08-2015, 09:58 AM
RE: You latest workflow improvement - by z3bra - 17-08-2015, 11:50 AM
RE: Your latest workflow improvement - by venam - 17-08-2015, 01:56 PM
RE: Your latest workflow improvement - by dkeg - 17-08-2015, 10:56 PM
RE: Your latest workflow improvement - by swathe - 17-08-2015, 11:14 PM
RE: Your latest workflow improvement - by z3bra - 18-08-2015, 04:51 AM
RE: Your latest workflow improvement - by dkeg - 18-08-2015, 07:18 AM
RE: Your latest workflow improvement - by z3bra - 19-08-2015, 12:00 PM
RE: Your latest workflow improvement - by October - 24-08-2015, 07:04 PM
RE: Your latest workflow improvement - by jvarg - 25-08-2015, 04:06 AM
RE: Your latest workflow improvement - by vedard - 29-08-2015, 01:50 PM
RE: Your latest workflow improvement - by swathe - 31-08-2015, 02:17 AM
RE: Your latest workflow improvement - by greduan - 06-09-2015, 10:12 PM
RE: Your latest workflow improvement - by z3bra - 07-09-2015, 04:55 AM
RE: Your latest workflow improvement - by jury - 07-09-2015, 03:15 PM
RE: Your latest workflow improvement - by greduan - 09-09-2015, 11:46 AM
RE: Your latest workflow improvement - by z3bra - 09-09-2015, 01:45 PM
RE: Your latest workflow improvement - by dkeg - 13-09-2015, 06:24 PM
RE: Your latest workflow improvement - by venam - 14-09-2015, 02:06 PM
RE: Your latest workflow improvement - by dkeg - 14-09-2015, 09:23 PM
RE: Your latest workflow improvement - by ashen - 15-09-2015, 02:14 PM
RE: Your latest workflow improvement - by fraun - 21-10-2015, 10:54 AM
RE: Your latest workflow improvement - by fraun - 26-10-2015, 12:46 PM
RE: Your latest workflow improvement - by xero - 28-10-2015, 02:36 PM
RE: Your latest workflow improvement - by z3bra - 28-10-2015, 03:01 PM
RE: Your latest workflow improvement - by xero - 28-10-2015, 03:28 PM
RE: Your latest workflow improvement - by movq - 28-10-2015, 05:36 PM
RE: Your latest workflow improvement - by venam - 29-10-2015, 01:45 AM
RE: Your latest workflow improvement - by z3bra - 29-10-2015, 07:28 AM
RE: Your latest workflow improvement - by movq - 29-10-2015, 12:32 PM
RE: Your latest workflow improvement - by z3bra - 29-10-2015, 03:43 PM
RE: Your latest workflow improvement - by xero - 27-11-2015, 12:01 PM
RE: Your latest workflow improvement - by xero - 30-11-2015, 12:05 PM
RE: Your latest workflow improvement - by apk - 30-11-2015, 02:26 PM
RE: Your latest workflow improvement - by z3bra - 14-12-2015, 07:26 AM
RE: Your latest workflow improvement - by xero - 27-12-2015, 07:48 PM
RE: Your latest workflow improvement - by apk - 27-12-2015, 10:51 PM
RE: Your latest workflow improvement - by venam - 28-12-2015, 01:38 AM
RE: Your latest workflow improvement - by z3bra - 28-12-2015, 04:27 AM
RE: Your latest workflow improvement - by kirby - 28-12-2015, 09:28 AM
RE: Your latest workflow improvement - by z3bra - 25-01-2016, 01:17 PM
RE: Your latest workflow improvement - by josuah - 28-07-2016, 09:32 PM
RE: Your latest workflow improvement - by Tmplt - 29-07-2016, 02:38 AM
RE: Your latest workflow improvement - by venam - 29-07-2016, 02:55 AM
RE: Your latest workflow improvement - by z3bra - 29-07-2016, 04:16 AM
RE: Your latest workflow improvement - by josuah - 29-07-2016, 06:44 AM
RE: Your latest workflow improvement - by z3bra - 29-07-2016, 06:46 AM
RE: Your latest workflow improvement - by Tmplt - 30-07-2016, 06:51 PM
RE: Your latest workflow improvement - by b3atr - 03-08-2016, 05:10 PM
RE: Your latest workflow improvement - by Adrift - 20-02-2017, 08:51 PM
RE: Your Latest Workflow Improvement - by josuah - 19-04-2017, 08:14 PM
RE: Your Latest Workflow Improvement - by josuah - 20-04-2017, 06:41 AM
RE: Your Latest Workflow Improvement - by Mafia - 21-04-2017, 02:08 PM
RE: Your Latest Workflow Improvement - by josuah - 21-04-2017, 02:41 PM
RE: Your Latest Workflow Improvement - by Mafia - 21-04-2017, 04:26 PM
RE: Your Latest Workflow Improvement - by z3bra - 21-04-2017, 06:53 PM
RE: Your Latest Workflow Improvement - by r4ndom - 25-04-2017, 05:59 AM
RE: Your Latest Workflow Improvement - by drkhsh - 28-04-2017, 07:44 PM
RE: Your Latest Workflow Improvement - by jvarg - 03-05-2017, 06:21 PM
RE: Your Latest Workflow Improvement - by z3bra - 04-05-2017, 05:39 PM
RE: Your Latest Workflow Improvement - by venam - 05-05-2017, 12:42 AM
RE: Your Latest Workflow Improvement - by jvarg - 05-05-2017, 03:52 AM
RE: Your Latest Workflow Improvement - by z3bra - 11-06-2017, 07:31 AM
RE: Your Latest Workflow Improvement - by xcko - 12-06-2017, 10:38 PM
RE: Your Latest Workflow Improvement - by z3bra - 13-06-2017, 09:33 AM
RE: Your Latest Workflow Improvement - by gaak - 31-12-2018, 02:06 AM
RE: Your Latest Workflow Improvement - by prx* - 02-01-2019, 02:14 PM
RE: Your Latest Workflow Improvement - by gaak - 02-01-2019, 09:33 PM
RE: Your Latest Workflow Improvement - by anthk - 09-01-2019, 07:24 PM
RE: Your Latest Workflow Improvement - by prx* - 22-02-2019, 07:58 AM
RE: Your Latest Workflow Improvement - by venam - 27-02-2019, 06:20 AM
RE: Your Latest Workflow Improvement - by z3bra - 27-02-2019, 11:40 AM
RE: Your Latest Workflow Improvement - by grah - 16-03-2019, 06:22 PM
RE: Your Latest Workflow Improvement - by Igrom - 18-03-2019, 11:52 AM
RE: Your Latest Workflow Improvement - by wolf - 28-03-2019, 02:36 PM
RE: Your Latest Workflow Improvement - by prx* - 30-03-2019, 09:49 AM
RE: Your Latest Workflow Improvement - by wolf - 31-03-2019, 06:01 PM
RE: Your Latest Workflow Improvement - by z3bra - 31-03-2019, 07:05 PM
RE: Your Latest Workflow Improvement - by pkal - 01-04-2019, 09:55 AM
RE: Your Latest Workflow Improvement - by fraun - 05-04-2019, 11:37 AM
RE: Your Latest Workflow Improvement - by z3bra - 05-04-2019, 02:24 PM
RE: Your Latest Workflow Improvement - by pkal - 12-04-2019, 02:08 AM
RE: Your Latest Workflow Improvement - by z3bra - 12-04-2019, 10:57 AM
RE: Your Latest Workflow Improvement - by acg - 12-04-2019, 01:40 PM
RE: Your Latest Workflow Improvement - by z3bra - 12-04-2019, 02:03 PM
RE: Your Latest Workflow Improvement - by prx* - 16-04-2019, 05:29 AM
RE: Your Latest Workflow Improvement - by z3bra - 16-04-2019, 05:57 AM
RE: Your Latest Workflow Improvement - by venam - 16-04-2019, 06:16 AM
RE: Your Latest Workflow Improvement - by prx* - 16-04-2019, 11:00 AM
RE: Your Latest Workflow Improvement - by prx* - 16-04-2019, 11:00 AM
RE: Your Latest Workflow Improvement - by z3bra - 16-04-2019, 07:03 PM
RE: Your Latest Workflow Improvement - by prx* - 19-04-2019, 04:26 AM
RE: Your Latest Workflow Improvement - by z3bra - 19-04-2019, 07:26 AM
RE: Your Latest Workflow Improvement - by mrtn - 25-04-2019, 04:32 AM
RE: Your Latest Workflow Improvement - by z3bra - 25-04-2019, 08:45 AM
RE: Your Latest Workflow Improvement - by mrtn - 25-04-2019, 10:11 AM
RE: Your Latest Workflow Improvement - by wolf - 22-05-2019, 10:13 PM
RE: Your Latest Workflow Improvement - by z3bra - 23-05-2019, 03:48 AM
RE: Your Latest Workflow Improvement - by Doom - 24-05-2019, 06:56 PM
RE: Your Latest Workflow Improvement - by prx* - 25-05-2019, 02:10 AM
RE: Your Latest Workflow Improvement - by tudurom - 25-05-2019, 05:35 PM
RE: Your Latest Workflow Improvement - by budRich - 26-05-2019, 06:59 AM
RE: Your Latest Workflow Improvement - by Doom - 28-05-2019, 05:27 PM
RE: Your Latest Workflow Improvement - by z3bra - 29-05-2019, 10:46 AM
RE: Your Latest Workflow Improvement - by piotr - 28-06-2019, 02:02 PM
RE: Your Latest Workflow Improvement - by Saos - 29-06-2019, 01:43 PM
RE: Your Latest Workflow Improvement - by wolf - 16-07-2019, 06:53 PM
RE: Your Latest Workflow Improvement - by jkl - 18-07-2019, 04:35 PM
RE: Your Latest Workflow Improvement - by wolf - 22-07-2019, 05:48 PM
RE: Your Latest Workflow Improvement - by jkl - 22-07-2019, 06:00 PM
RE: Your Latest Workflow Improvement - by z3bra - 22-07-2019, 07:14 PM
RE: Your Latest Workflow Improvement - by jkl - 22-07-2019, 10:06 PM
RE: Your Latest Workflow Improvement - by pkal - 23-07-2019, 10:01 AM
RE: Your Latest Workflow Improvement - by jkl - 23-07-2019, 11:30 AM
RE: Your Latest Workflow Improvement - by Halfwit - 24-07-2019, 11:49 PM
RE: Your Latest Workflow Improvement - by anthk - 18-11-2019, 08:51 PM
RE: Your Latest Workflow Improvement - by venam - 10-05-2021, 02:13 AM
RE: Your Latest Workflow Improvement - by s0kx - 10-05-2021, 02:27 AM
RE: Your Latest Workflow Improvement - by seninha - 10-05-2021, 09:24 AM
RE: Your Latest Workflow Improvement - by freem - 11-05-2021, 08:56 AM
RE: Your Latest Workflow Improvement - by dany74q - 23-06-2021, 05:42 PM
RE: Your Latest Workflow Improvement - by jkl - 30-06-2021, 10:30 AM
RE: Your Latest Workflow Improvement - by dany74q - 30-06-2021, 05:46 PM
RE: Your Latest Workflow Improvement - by jkl - 30-06-2021, 06:31 PM
RE: Your Latest Workflow Improvement - by freem - 26-08-2021, 07:48 PM
RE: Your Latest Workflow Improvement - by seninha - 18-02-2022, 09:51 AM
RE: Your Latest Workflow Improvement - by pfr - 25-02-2022, 12:30 AM