0
votes
2answers
31 views

How do I set environment variables through a keyboard shortcut?

I have a script that increments an environment variable, but it only works if I run it by perpending it with "source" or with a ".". Unfortunately, this means that if I attempt to bind it to a key, I ...
0
votes
0answers
50 views

Disable 'ESC' and 'Shift + Tab' history shortcuts in terminal

When in a bash terminal, if I hit ESC or Shift + Tab the command line goes to the history where I can move around to previous bash commands with vi-like bindings. I get messed up when in this mode ...
1
vote
1answer
39 views

~/.inputrc is missed in ubuntu 14.04 => Cannot create a key binding

I want to add this key binding in the suitable conf file : Control-t: "top -Ss \C-m" Which means : Bind Ctrl+T keys to top -Ss command line . i enter on terminal sudo ls ~/.inputrc to check ...
30
votes
6answers
2k views

Shortcut to clear command line terminal [duplicate]

Is there a shortcut to clear the command line when typing in it instead of keeping backspace pressed for a few long seconds? I ask because I regularly use the Tab key to automatically fill in file ...
1
vote
2answers
43 views

Bash/zsh: Undo erase backwards (ctrl+w)

In Bash and Zsh ctrl+w erases backwards from where the cursor is. Is it also possible to undo what I had erased? Thanks!
9
votes
6answers
524 views

Is there any manual to get the list of bash shortcut keys?

There are many shortcuts that I use while interacting with bash command line to make the work easier and faster. Like: ctrl+L: to clear the screen ctrl+a/ctrl+e: to move start/end of the line ...
7
votes
1answer
109 views

Bash history keyboard shortcut for !*

In Bash, there are some handy operators to repeat parts of the last command: !^ expands to the first argument of the previous command, e.g., $ echo one "two three" one two three $ echo !^ echo one ...
0
votes
0answers
58 views

How to auto-run a script each time a Global Keyboard Shortcut is used in Ubuntu?

I don't want to reassign the Global Keyboard Shortcut keys. They should be doing their what they were meant to do. But in addition to that, I would like a bash script to run every time the particular ...
1
vote
0answers
46 views

Mutiple music player play pause toggle problem

In my setup I use xfce. xfce does not have any method to control the playing and pausing of music players, so I wrote my own script to control the play\pause, next, and previous commands. The problem ...
4
votes
1answer
3k views

How to link a custom keyboard shortcut to a bash script in Ubuntu 13.04?

As an Ubuntu 13.04 user I had myself as well various problems and incompatibilities with this newest version of Ubuntu. One of these is that the Brightness bar has suddenly disappeared from the ...
6
votes
1answer
249 views

Bind byobu window to Ctrl+Shift+T shortcut

Ctrl+Shift+T shortcut runs the gnome-terminal by default. I have installed byobu, and I want this shortcut to open the latest used byobu session. When pressed multiple times, I should still have just ...
10
votes
1answer
8k views

Bash: delete word ahead of cursor

Consider the following bash prompt, where ^ denotes the prompt location: svn commit -m very/long/path/to/some/file "[bug 123456] Fix the pixel issue" ^ I'd like to commit a different ...
2
votes
1answer
257 views

Is there a “Super” break key for bash?

When using terminal sometimes you need to break the program. Sometimes you press Ctrl-c sometimes Ctrl-x and sometimes Ctrl-z In some circumstances, it might simply be closing a quote or pressing ...
1
vote
1answer
297 views

Can I write keyboard shortcut in bash script?

Can I write keyboard shortcut in bash script like: #!bin/bash echo Hello ^z # this is kbd shortcut This didn't work. Is there any other way?
0
votes
4answers
1k views

Keyboard shortcut to a sudo-script

How do I create a keyboard shortcut to a script that needs sudo privileges? I tried to create shortcuts via Ubuntu Keyboard Settings GUI to scripts "sh script.sh", "sudo sh script.sh" , but ...
3
votes
1answer
2k views

How do I launch a bash script using a keyboard shortcut?

Just like the title says, how do I launch a bash script in my ~/Downloads folder using a keyboard shortcut? I've tried binding cd ~/Downloads && ./bash-script.sh to different accelerators (ex. ...
1
vote
1answer
1k views

Why we can't run commands with gnome shortcuts?

When I make a custom shortcut with gnome (gnome-control-center keyboard) I can't set it to a command. Why? Example: I can't set a shortcut for sudo apt-get update. Instead I must first invoke a ...
4
votes
2answers
720 views

How do I disable global gnome shortcuts in gnome-terminal?

Bash has a myriad of useful shortcuts. For instance Alt+B, which moves the cursor back one word. Only I have assigned this particular combination and a few other shortcuts to do things in gnome. The ...
3
votes
1answer
292 views

link key to a bash script

I'm trying to link a button (now without function) to a bash script that I have made on UBUNTU. I'm using a clevo W150HNM/Sager NP5160 I want to use 1 or 4 for this(see photo on ...
0
votes
1answer
207 views

Is there a better (closer to home row on keyboard) shortcut for the home directory in bash than tilde?

I don't like reaching for the tilde ~ key so often when I'm specifying file and program paths relative to the user home directory on the command line. Does anyone have any tips for cutting the number ...
3
votes
2answers
9k views

Using up arrow to run previous command

What setup do I need to use up-arrow to run previous command? With Mac, I can use up-arrow to rerun the command that I just run, but it doesn't seem to work with my bash shell. I use 8.04 (I can't ...
4
votes
2answers
262 views

Bash keybindings that match those of gedit?

I want to have the same keybindings in gedit and in bash. Namely all the selections, also cut, copy and paste. I know there are some important ones that are already taken (Ctrl+C, Ctrl+W, etc), ...
3
votes
2answers
421 views

A simple script. A simple binding. So why isn't it simple?

I've used xbindkeys to associate a hot-key with /usr/bin/test.sh I can run the script two ways now! (well, not always! hence this question.) eg. /usr/bin/test.sh contains #!/bin/sh gedit ...